Wuu Posted July 28, 2009 Report Share Posted July 28, 2009 Uzpiežu View CSS ,un uz objekta jo tur tāda interesanta fīča ka nekādīgi nevarēja nomainīt stylu! .blue_link (line 264) { color: #0080c0; font-size: 0.8em; } a:visited (line 12) { background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; color: #000000; text-decoration: none; } a:hover (line 13) { background-color: transparent; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; color: #000000; text-decoration: none; } Kāpēc css tik nolasīts no apakšas uz augšu? Quote Link to comment Share on other sites More sharing options...
cucumber Posted July 28, 2009 Report Share Posted July 28, 2009 man liekas, ta tik tava ficha ta attelo, jo fire bug ar bik savadak attelo neka isteniba ir. Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted July 28, 2009 Report Share Posted July 28, 2009 Firebug attēlo pēc prioritātēm. Un tāpat izskatās, ka ir šeit. Quote Link to comment Share on other sites More sharing options...
Wuu Posted July 28, 2009 Author Report Share Posted July 28, 2009 Kas to prioritāti nosaka? Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted July 28, 2009 Report Share Posted July 28, 2009 Tu. :) Es īsti nezinu kur meklēt attiecīgo informāciju, bet, piemēram, inline css vienmēr būs ar augstāko prioritāti, tāpat klase, būs augstāka prioritāte, nekā vispārīgam taga definējumam, piemēram a, tas parādās arī tavā piemērā. Faktiski, jo tu precīzāk norādi kādam elementam piešķirt atbilstošo css, jo lielāka prioritāte tam. Secība css failā ir svarīga tikai tad, kad tev ir definējumi ar vienādu prioritāti, tavā piemērā - a:visited, a:hover Quote Link to comment Share on other sites More sharing options...
cucumber Posted July 28, 2009 Report Share Posted July 28, 2009 kur tad citur neka specene http://www.w3.org/TR/CSS21/cascade.html#specificity skaiti pats kapec sanak ta Quote Link to comment Share on other sites More sharing options...
mefisto Posted July 31, 2009 Report Share Posted July 31, 2009 Varbūt šitas palīdz labāk saprast : http://www.stuffandnonsense.co.uk/archives/images/specificitywars-05v2.jpg Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.