22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The next example creates markers before and after list items.<br />

This document:<br />

<br />

<br />

<br />

Markers before and after list items<br />

<br />

@<strong>media</strong> screen, print {<br />

LI:before {<br />

display: marker;<br />

content: url("smiley.gif");<br />

LI:after {<br />

display: marker;<br />

content: url("sad.gif");<br />

}<br />

}<br />

<br />

<br />

<br />

<br />

first list item comes first<br />

second list item comes second<br />

<br />

<br />

<br />

should produce something like this (ascii art is used instead of smiley gif<br />

images here):<br />

:-) first list item<br />

comes first :-(<br />

:-) second list item<br />

comes second :-(<br />

The next example uses markers to number notes (paragraphs).<br />

The following document:<br />

<br />

<br />

<br />

Markers to create numbered notes4>/TITLE><br />

<br />

P { margin-left: 12 em; }<br />

@<strong>media</strong> screen, print {<br />

P.Note:before {<br />

display: marker;<br />

content: url("note.gif")<br />

"Note " counter(note-counter) ":";<br />

counter-increment: note-counter;<br />

text-align: left;<br />

width: 10em;<br />

}<br />

}<br />

<br />

<br />

<br />

This is the first paragraph in this document.<br />

166

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!