-
Notifications
You must be signed in to change notification settings - Fork 72
/
heart.html
74 lines (68 loc) · 1.37 KB
/
heart.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
<style>
.back {
position: fixed;
padding: 0;
margin:auto;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: white;
animation-name: backdiv;
animation-duration: 1s;
animation-iteration-count: infinite;
}
.heart {
position: fixed;
margin-left:-250px ;
margin-top:-250px ;
top: 50%;
right: 0;
bottom: 0;
left: 50%;
background-color: pink;
height: 500px;
width: 500px;
transform: rotate(-45deg);
animation-name: beat;
animation-duration: 1s;
animation-iteration-count: infinite;
}
.heart:after {
background-color: pink;
content: "";
border-radius: 500%;
position: absolute;
width: 500px;
height: 500px;
top: -250px;
left: 0%;
}
.heart:before {
background-color: pink;
content: "";
border-radius: 500%;
position: absolute;
width: 500px;
height: 500px;
top: 0%;
left: 250px;
}
@keyframes backdiv {
50% {
background: #ffe6f2;
}
}
@keyframes beat {
0% {
transform: scale(1) rotate(-45deg);
}
50% {
transform: scale(0.6) rotate(-45deg);
}
}
</style>
<html>
<div class="back"></div>
<div class="heart"></div>
</html>