![]() |
| http://www.w3.org/Style/CSS/ |
P {text-indent: 10pt}
| Ruleset identifies selector or selectors and declares style which is to be attached to that selector or selectors. P {text-indent: 10pt} is a CSS rule |
| @ | At-rule is a rule that applies to the whole style sheet and not to a specific selector only. @font-face |
/* declaració */
.footnote {font: 70%}
<P CLASS=footnote>And so is this</P>
| Class selector "." Especifica una selecció de estil. S'utilitza amb el atribut CLASS i pot estar associat a qualsevol element i repetir-se tantes vegades com calgui. |
#abc123 {color: red;}
<P ID=abc123>This and only this | ID selector: "#" identifica de manera unica un element. No pot repetir-se. Acostuma a identificar una àrea de la pàgina. Es declara amb #. |
P .footnote {color: red}
| Any element with CLASS footnote will be red but only if it occurs in the context of P |
BODY ~ P {background: red;}
<BODY><P>Red paragraph </P></BODY>
| Parent-child selectors are created by listing two or more tilde (~) separated selectors. The P element will be declared the specified style only if it directly descends from the BODY element |
http://www.hwg.org/resources/faqs/cssFAQ.html

No hay comentarios:
Publicar un comentario