ray Posted February 4, 2008 Report Share Posted February 4, 2008 kkur esmu redzējis, ka uzbraucot uz div lauka, tas iekrāsojas citā krāsā un nobraucot paliek vecajā. va to ir iespējams veikt bez javascript palīdzības? Link to comment Share on other sites More sharing options...
andrisp Posted February 4, 2008 Report Share Posted February 4, 2008 (edited) Ir CSS pseidoklase ::hover, bet tā uz IE6 un vecākiem strādā tikai uz A elementem. Citos pārlūkos un IE7 strādā uz visiem. Edited February 4, 2008 by andrisp Link to comment Share on other sites More sharing options...
ray Posted February 4, 2008 Author Report Share Posted February 4, 2008 (edited) šāds kods: <div class="lan1"> <div id="lan2">TEST1</div><div id="lan2">TEST2</div> </div> div.lan1 { float: right; padding-right: 1px; background-color: #0066CC; } #lan2 { padding: 4px; margin-left: 1px; float: right; display: block; background-color: #FFFFFF; } #lan2 :hover { padding: 4px; margin-left: 1px; background-color: #0066CC; } uzbraucot uz div man vajadzēju, lai viss iekrāsojas zils, bet tā nav, palielinās laukums par to padding 4px un apkārt paliek balts :/ Edited February 4, 2008 by ray Link to comment Share on other sites More sharing options...
andrisp Posted February 4, 2008 Report Share Posted February 4, 2008 Izņem atstarpi pirms :hover. Man darbojās. Link to comment Share on other sites More sharing options...
ray Posted February 4, 2008 Author Report Share Posted February 4, 2008 tagad viss kārtībā. Paldies ;) Link to comment Share on other sites More sharing options...
Recommended Posts