Tuesday, September 1, 2009

pseudo-elements

aloow us to extend our selecter so we can be more specific as to what we want to select, first letter of a paragraph.
eg:
p:first-letter {
font-size:2em;
color:green
}

note css 3.. need 2 ::

p:first-line {
text-transform:capitalize;
}
note not all browsers support this property.
firefox does.
the amount on our first line can change.

*(everything)
*:selection {
background:green;
color:red;
}

any text that is selected by the user will now be highlighted and any text will be coloured red that is selcted.
opera and safari are the only 2 browsers that support this element.

No comments:

Post a Comment