-
Notifications
You must be signed in to change notification settings - Fork 0
/
5_hexagon.html
41 lines (41 loc) · 1003 Bytes
/
5_hexagon.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>六边形</title>
<style>
#div1{
width: 100px;
height: 55px;
position: relative;
margin: 100px auto;
background: #0096dd;
}
#div1::before{
content: '';
width: 0;
height: 0;
position: absolute;
top: -25px;
left: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom: 25px solid #0096dd;
}
#div1::after{
content: '';
width: 0;
height: 0;
position: absolute;
bottom: -25px;
left: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-top: 25px solid #0096dd;
}
</style>
</head>
<body>
<div id="div1"></div>
</body>
</html>