-
Notifications
You must be signed in to change notification settings - Fork 14
/
borders_image-examples-plaque.html
executable file
·75 lines (65 loc) · 2.19 KB
/
borders_image-examples-plaque.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>A simple plaque effect and its older-browser fallback</title>
<link rel="stylesheet" type="text/css" href="c/pbom-baseline.css">
<style type="text/css">
body {display: flex; justify-content: space-around; padding: 3em 1em 3em 0;}
p {flex-grow: 1; margin: 0 3em;}
#plaque, #fallback {
padding: 10px;
border: 3px outset goldenrod;
background: goldenrod;
border-image-source: url(i/plaque.png);
border-image-repeat: stretch;
border-image-slice: 20 fill;
border-image-width: 12px;
border-image-outset: 9px;
}
#fallback {border-image-source: none;}
#image {position: relative; padding: 0; margin-top: 1em;}
#image img {display: block;}
p b {position: absolute; font: 1em Consolas, monospace; border: 1px dotted rgba(0,0,0,0.5); box-sizing: border-box;}
b.t, b.b {left: -2em; right: -2em;}
b.r, b.l {top: -2em; bottom: -2em;}
b.t {border-width: 0 0 2px 0; top: 0;
background: url(i/arrow-down.png) no-repeat 83% 100%;
background-size: 10px auto;}
b.r {border-width: 0 0 0 2px; right: 0;
background: url(i/arrow-left.png) no-repeat 0% 85%;
background-size: auto 10px;}
b.b {border-width: 2px 0 0 0; bottom: 0;
background: url(i/arrow-up.png) no-repeat 17% 0%;
background-size: 10px auto;}
b.l {border-width: 0 2px 0 0; left: 0;
background: url(i/arrow-right.png) no-repeat 100% 15%;
background-size: auto 10px;}
p b i {position: absolute; font-style: normal;}
b.t i {right: 0%; bottom: 0%; margin-bottom: 0;}
b.r i {bottom: -0.25em; left: 0%; margin-left: 0.25em;}
b.b i {left: 0%; top: 0%; margin-top: 0.125em;}
b.l i {top: 0%; right: 0%; margin-right: 0.25em;}
b.t, b.b {height: 20px;}
b.r, b.l {width: 20px;}
</style>
</head>
<body>
<p id="plaque">
Bob hope investigationes. Volutpat consectetuer cuyahoga heights shaker heights.
</p>
<div>
<p id="image">
<img src="i/plaque.png">
<b class="t"><i>20</i></b>
<b class="r"><i>20</i></b>
<b class="b"><i>20</i></b>
<b class="l"><i>20</i></b>
</p>
</div>
<p id="fallback">
Bob hope investigationes. Volutpat consectetuer cuyahoga heights shaker heights.
</p>
</body>
</html>