G-Style Posted November 7, 2007 Report Share Posted November 7, 2007 (edited) Topiks laikam jau sanaaks mazliet pastulbs,bet lai jau... Kas gribees, sapratiis un paliidzees... Kaa var panaakt sito: ieks www.gign.lv augseeja izveele jeb navigaacija. Uzbiidot peli mainaas kraasas, uzklikskinot arii... :) Ja pareizi atceros tas bija or mouseover panaaakts tik vairs neatceros kaa un nezinu arii kaa mekleet... Taapeec paliidziet ja varat ar kaadu skaidru piemeeru. Paldies! Edited November 7, 2007 by G-Style Link to comment Share on other sites More sharing options...
Vebers Posted November 7, 2007 Report Share Posted November 7, 2007 (edited) gign tas ir panākts ar css palīdzību skaties a:hover li:hover vai tamlīdzīgi. Labāk ir to panākt ar CSS, jo tā var attdalīt HTML no dizaina, bet ir iespējams arī ar JavaScript. <script> function setColor(obj, color) { obj.style.color = color; } </script> <a href="#" onMouseOver="setColor(this, 'red')" onMouseOut="setColor(this, 'white')">teksts teksts</a> Edited November 7, 2007 by MakaTaNaw Link to comment Share on other sites More sharing options...
G-Style Posted November 7, 2007 Author Report Share Posted November 7, 2007 <script> function setColor(obj, color) { obj.style.color = color; } </script> <a href="#" onMouseOver="setColor(this, 'red')" onMouseOut="setColor(this, 'white')">teksts teksts</a> Sitais panaaks tikai texta vai visa laukuma iekraasoshanos? Link to comment Share on other sites More sharing options...
Vebers Posted November 7, 2007 Report Share Posted November 7, 2007 Tieši tas piemērs panāks teksta krāsas maiņu. Bet ar Javascript style object var mainīt daudz stila propertijus: http://www.irt.org/xref/style.htm Link to comment Share on other sites More sharing options...
G-Style Posted November 7, 2007 Author Report Share Posted November 7, 2007 Thanks! Link to comment Share on other sites More sharing options...
Kavacky Posted November 8, 2007 Report Share Posted November 8, 2007 Uz a:hover saliec, lai maina, ko vien gribi. a { background: #FFFFFF; color: #000000; font-family: 'Arial'; text-decoration: none; } a:hover { background: #0000DA; border: 1px solid #00FF00; color: #CCAB05; font-family: 'Verdana'; text-decoration: underline; } Link to comment Share on other sites More sharing options...
andrisp Posted November 8, 2007 Report Share Posted November 8, 2007 Es arī labāk iesaku šādu lietu ar CSS taisīt. Daudz ērtāk, un arī loģiskāk. (Par loģiskumu gan šoreiz nediskutēšu). Un kad uzspiež (un atveras tā jaunā izvēlētā sadaļa), pieliec attiecīgajam navigācijas elementam klāt klasi selected. Un tad iekš CSS: #nav .selected { background-color: white; /* utt */ } Link to comment Share on other sites More sharing options...
marcis Posted November 8, 2007 Report Share Posted November 8, 2007 Plus variants - apskaties pats to saurci, kuru dod mums. Tikai ieteikums. Link to comment Share on other sites More sharing options...
Recommended Posts