-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy path08_dropcap.html
41 lines (35 loc) · 1.12 KB
/
08_dropcap.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE HTML>
<html>
<head>
<style>
head, style {display: block;}
[contenteditable] {-webkit-user-modify: read-write-plaintext-only;}
html, body {margin: 0;}
style:first-of-type {visibility:hidden;}
style:last-of-type {padding: 20px; font-size: 1.5em; white-space: pre; font-family: monospace; white-space:pre; border-radius: 10px; border: 3px solid #aaa; background-color:#dedede; margin: 20px auto; width: 80%; font-family:"Courier New", Courier, monospace;}
:root {background-color:#ccc;
background-image:url(../css/page-bg.jpg);}
p{width: 450px;
font-size: 36px;
font-family:Georgia, "Times New Roman", Times, serif;
margin: 0 20px 20px;
}</style>
<style contenteditable>
p:first-of-type::first-letter {
position: relative;
top: 8px;
float: left;
font-size: 3em;
line-height: 1;
color: #C7573A;
padding: 0 4px 2px 0;
font-weight: bold;
}
</style>
<title>CSS Drop Caps</title>
</head>
<body>
<p>You can even pretty drop-caps with :first-letter, but make sure to apply it to p:first-of-type so your site not too ugly. </p>
<p>This is a second paragraph. If it had a drop-cap this site would be ugly!</p>
</body>
</html>