-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheart.html
More file actions
77 lines (77 loc) · 1.55 KB
/
heart.html
File metadata and controls
77 lines (77 loc) · 1.55 KB
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
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div class="heart">
<div class="c-r"></div>
<div class="c-l"></div>
<div class="h-b"></div>
</div>
<div class="test">❤</div>
<div class="love"></div>
</body>
<style>
.heart{
width: 100px;
height: 100px;
position: relative;
}
.c-l{
width: 60px;
height: 60px;
position: absolute;
left: 0;
border-radius: 50%;
background-color: #ff0000;
}
.c-r{
width: 60px;
height: 60px;
position: absolute;
right: 0;
border-radius: 50%;
background-color: #ff0000;
}
.h-b{
width: 60px;
height: 60px;
position: absolute;
top: 20px;
left: 20px;
transform: rotate(45deg);
background-color: #ff0000;
}
.test{
color: #ff0000;
font-size: 110px;
}
.love {
/* 爱心 */
position: relative;
}
.love:before {
content: "";
width: 70px;
height: 110px;
background: #f00;
position: absolute;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
transform: rotate(45deg);
}
.love:after {
content: "";
width: 70px;
height: 110px;
background: #f00;
position: absolute;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
transform: rotate(-45deg);
left: -30px;
}
</style>
</html>