-
Notifications
You must be signed in to change notification settings - Fork 14
/
borders_border-radius-slash-simple.html
executable file
·48 lines (43 loc) · 1.27 KB
/
borders_border-radius-slash-simple.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Elliptical corner rounding</title>
<style type="text/css">
body {display: flex; justify-content: center;}
.arena p {font-size: 3em; border: 4px solid black; padding: 2em;
border-radius: 2.1em;
position: relative;
background-color: silver; background-clip: content-box;}
.arena p b {position: absolute;
font: 0.5em Arvo, serif;
height: 7.85em; width: 3.5em; border-radius: 2em / 4em;
border: 2px dashed green;
background-image:
radial-gradient(2em 4em at center, transparent 1.5em, rgba(0,128,0,0.25) 1.9em),
linear-gradient(to left, black, black),
linear-gradient(to left, black, black);
background-repeat: no-repeat;
background-size: 100% 100%, 50% 1px, 1px 50%;
}
.arena p b.top {top: 0;}
.arena p b.left {left: 0;
background-position: center, center left, top center;
}
.arena p b i {background: white; font-style: normal;}
.arena p b i:first-child {position: absolute; top: 52%; left: 0.5em;}
.arena p b i:nth-child(2) {position: absolute; top: 1.5em; left: 50%; margin-left: -1.5ch;}
</style>
<style type="text/css">
.arena p {border-radius: 1em / 2em;}
</style>
</head>
<body>
<section class="arena">
<p>
My borders are rounded.
<b class="top left"><i>1em</i><i>2em</i></b>
</p>
</section>
</body>
</html>