Graphics Programs Reference
In-Depth Information
Figure 2-1: Enlarging the fi rst letter of an h1.
Simply by changing the dot to a colon, thus yielding li:first-child , you have the same
end result without the need to go sprinkling classes all over the markup.
You may also have picked up on the double-colon syntax used with pseudo-elements. h is
was introduced at er CSS2.1. As of this writing, no browser requires that you use the double-
colons before pseudo-elements: A single colon works just i ne.
As a side note, CSS3 adds the following pseudo-classes, most of which are not widely sup-
ported as of this writing:
:target
:root
:nth-child()
:nth-of-type()
:nth-last-of-type()
:first-of-type
:last-of-type
:only-of-type
:only-child
:last-child
:empty
:not()
:enabled
:disabled
:checked
41
TARGETS WITH STYLE
It can be very useful to point to a fragment identii er within a document. What's that, you say?
It's as simple as this:
< a href="http: // example.com / law.html#sec2-7">Section 2 .7< / a>
 
Search WWH ::




Custom Search