Prev | Current Page 162 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"


How this text is broken up into lines by a user agent depends on
how the text is rendered, font properties, size of browser window,
and size of viewing device.


17 http://tinyurl.com/2eecpg
111 Selector Reference
The selector p:first-line will match the first line of text rendered by the user
agent. We can see how a user agent might insert the pseudo-element into the HTML
block like this:

This is a paragraph of text
containing several lines of text.
How this text is broken up into
lines by a user agent depends on
how the text is rendered, font
properties, size of browser
window, and size of viewing
device.


The above markup isn??™t valid HTML; it??™s just a visualization of the pseudo-element
concept.
If the first child node of an element is another block element, this pseudo-element
will propagate to the child node. Here??™s another example:

This is a paragraph of text containing several lines of text.
How this text is broken up into lines by a user agent depends on
how the text is rendered, font properties, size of browser
window, and size of viewing device.


Pages:
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174