HTML and CSS Reference
In-Depth Information
p {
text-align:
justify;
clear: left;
}
p::first-letter {
font-size: 400%;
float: left;
line-height: 1em;
padding-right:
0.1em;
}
p::first-line {
font-size: 150%;
}
Choosing elements based on user interaction
Dynamic pseudo-classes allow you to assign different styles to ele-
ments based on user activity. One of the best known of these is the
:hover pseudo-class, introduced in CSS2 , which lets you apply a differ-
ent style to an element when the mouse pointer is hovering over it (see
appendix C for some examples).
CSS3 adds several new dynamic
pseudo-classes. In this section,
you'll learn about styling form
elements based on their proper-
ties. This will let you give cues
to your users about the state of
form elements—for example,
whether they're required or
whether they're currently valid.
After that, you'll learn about the
target selector that lets you style
the page based on the current
URL , which is useful for tabbed
interfaces and slide shows.
Enabled/
disabled/
checked
Valid/
invalid/
required
Target
1.0
10.0
1.0
3.0
4.0
3.5
9.0
10.0
9.0
9.0
9.5
10.0
3.0
5.0
3.0
 
Search WWH ::




Custom Search