Quote:
Originally Posted by Doitsu
... makes it easy to add dropcaps to ebooks with lots of chapters in them without having to mark the first letter of the paragraph...
|
Just a variant for multiple chapters (when contained in a single html document):
Code:
h3:nth-child(2n) {
font-family: sans-serif;
font-size: 2em;
text-align: center;
text-transform: uppercase;
text-shadow: 2px 2px 3px grey;
transform: rotate(-3deg);
-webkit-transform: rotate(-3deg);
}
h3:nth-child(2n+1) {
font-family: sans-serif;
font-size: 2em;
text-align: center;
text-transform: uppercase;
text-shadow: 2px 2px 3px grey;
transform: rotate(3deg);
-webkit-transform: rotate(3deg);
}
/* paragraph immediately following heading3 */
h3 + p {
text-indent: 0;
}
p {
margin: 0;
text-indent: 1em;
}
/* Small Caps RbnJrg: p:nth-child(2):first-line*/
h3 + p:first-line {
font-variant: small-caps;
font-size:1.2em;
font-weight: bold;
}
/* Dropcaps Doitsu p:nth-child(2):first-letter */
h3 + p:first-letter {
float: left;
font-size: 4em;
font-weight: bold;
margin-top: -0.2em;
margin-bottom: -0.2em;
margin-right: 5px;
}

Thanks for digging more into this Doitsu and RbnJrg. Interesting, if not always reliable. My mileage did vary depending on devices. eReaders manufacturers must like that « The beauty with standards is that there are so many to choose from »