七夕情人节,漂浮的粉红爱心

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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<html lang="en" >
<head>
<style type="text/css">
.world {
position: absolute;
margin:auto;
left:0;
right:0;
top:0px;
bottom:0;
width:800px;
height:200px;
}
/* BASIC CUBE CREATION */
/* BASIC CUBE CREATION */
/* BASIC CUBE CREATION */

.box {
position:absolute;
margin:auto;
left:0;
right:0;
top:0;
bottom:0;
width: 100px;
height: 100px;
animation: rotate 5s ease-in-out infinite;
transform-style: preserve-3d;
}
.box:nth-of-type(1) {
animation-delay:-5s;
left:-600px;
}
.box:nth-of-type(2) {
animation-delay:-4s;
left:-300px;
}
.box:nth-of-type(3) {
animation-delay:-3s;
left:0px;
}
.box:nth-of-type(4) {
animation-delay:-2s;
left:300px;
}
.box:nth-of-type(5) {
animation-delay:-1s;
left:600px;
}
.plane1, .plane2 {
position: absolute;
opacity:0.8;
}
.plane2 {
transform: rotateY(90deg);
}
.heart {
background-color: pink;
height: 50px;
transform: rotate(-45deg);
width: 50px;
}
.heart:before {
content: "";
background-color: pink;
border-radius: 100%;
height: 50px;
position: absolute;
width: 50px;
top:-25px;
}
.heart:after {
content: "";
background-color: pink;
border-radius: 100%;
height: 50px;
position: absolute;
width: 50px;
top:0px;
left:25px;
}

/* Rotation animation to actually see the cube */

@keyframes rotate {
0% {
transform: rotateY(0deg) rotateZ(25deg) translateY(50px);
}
50% {
transform: rotateY(270deg) rotateZ(25deg) translateY(-50px);
}
100% {
transform: rotateY(360deg) rotateZ(25deg) translateY(50px);
}
}
</style>
</head>
<body>

<div class="world">
<div class="box">
<div class="plane1">
<div class="heart"></div>
</div>
<div class="plane2">
<div class="heart"></div>
</div>
</div>
<div class="box">
<div class="plane1">
<div class="heart"></div>
</div>
<div class="plane2">
<div class="heart"></div>
</div>
</div>
<div class="box">
<div class="plane1">
<div class="heart"></div>
</div>
<div class="plane2">
<div class="heart"></div>
</div>
</div>
<div class="box">
<div class="plane1">
<div class="heart"></div>
</div>
<div class="plane2">
<div class="heart"></div>
</div>
</div>
<div class="box">
<div class="plane1">
<div class="heart"></div>
</div>
<div class="plane2">
<div class="heart"></div>
</div>
</div>
</div>
</body>
</html>

来源:https://laolion.com/


七夕情人节,漂浮的粉红爱心
http://yoursite.com/2022/08/17/特效/lovecss/
作者
雨停之後
发布于
2022年8月17日
许可协议