Pogledajte određenu poruku
Staro 08. 09. 2011.   #3
noviKorisnik
Dejan Katašić
Wrote a book
 
Avatar noviKorisnik
 
Datum učlanjenja: 10.06.2005
Lokacija: Novi Sad
Poruke: 1.017
Hvala: 129
86 "Hvala" u 43 poruka
noviKorisnik će postati "faca" uskoro
Talking

Citat:
Use class selectors instead of descendant selectors.
For example, if you need two different styles for an ordered list item and an ordered list item, instead of using two rules:
Kôd:
    ul li {color: blue;}
    ol li {color: red;}
You could encode the styles into two class names and use those in your rules; e.g:
Kôd:
    .unordered-list-item {color: blue;}
    .ordered-list-item {color: red;}
If you must use descendant selectors, prefer child selectors, which at least only require evaluation of one additional node, not all the intermediate nodes up to an ancestor.
Primer preporuke kaže da svaki list item u html-u moraš da nakitiš odgovarajućom klasom ili nećeš imati prikaz koji bi inače želeo da ostvariš pravilima koja proglašavaju za neefikasna. (???)
noviKorisnik je offline   Odgovorite uz citat