-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
196 lines (169 loc) · 4.13 KB
/
index.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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.parent {
width: 100px;
height: 100px;
background: black;
position: relative;
left: 100px;
white-space: nowrap;
overflow: hidden;
}
.parent:hover .son {
left: -100px;
}
.son {
display: flex;
position: absolute;
transition: all 1s ease;
}
.num1 {
width: 100px;
height: 20px;
color: #fff;
background: red;
}
.num2 {
width: 100px;
height: 20px;
color: #ffffff;
background: blue;
}
/*图片旋转*/
.rotate-box {
height: 200px;
width: 200px;
margin: 0 auto;
border: 1px solid pink;
overflow: hidden;
}
.rotate-box::before {
content: "我的";
display: block;
width: 100%;
height: 100%;
background: red;
color: #ffffff;
transform: rotate(180deg);
transform-origin: left bottom;
transition: all .4s;
}
.rotate-box:hover::before {
transform: rotate(0deg);
}
/* 图片缩放*/
.rotate-box2 {
width: 400px;
overflow: hidden;
background: red;
border: 10px solid pink;
}
.rotate-box2 img {
width: 400px;
transition: all .4s;
vertical-align: middle;
}
.rotate-box2 img:hover {
transform: scale(1.2);
}
/* 动画*/
.keyframes {
width: 500px;
height: 500px;
background: red;
animation: move 2s;
}
@keyframes move {
0% {
transform: translateX(0px);
}
100% {
transform: translateX(1000px);
}
}
/* 地图*/
.map {
width: 500px;
height: 375px;
background: url("images/chinese-map.jpg") no-repeat;
position: relative;
}
.name {
position: absolute;
top: 200px;
left: 360px;
color: #ffffff;
}
.city {
position: absolute;
top: 200px;
left: 350px;
color: #ffffff;
}
.dotted {
width: 8px;
height: 8px;
background-color: #09f;
border-radius: 50%;
}
.city div[class^="pulse"] {
/*保证小波纹在父盒子里面水平垂直居中,放大以后就会在四周发散*/
width: 8px;
height: 8px;
box-shadow: 0 0 12px red;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 50%;
animation: pulse 1.2s linear infinite;
}
.city div.pulse2{
animation-delay: 0.4s;
}
.city div.pulse3{
animation-delay: 0.8s;
}
@keyframes pulse {
0% {
}
70% {
width: 30px;
height: 30px;
opacity: 1;
}
100% {
width: 60px;
height: 60px;
opacity: 0;
}
}
</style>
</head>
<body>
<div class="parent">
<div class="son">
<div class="num1">我</div>
<div class="num2">你</div>
</div>
</div>
<div class="rotate-box"></div>
<div class="rotate-box2">
<img src="images/1.jpg" alt="">
</div>
<div class="keyframes"></div>
<div class="map">
<div class="name">安徽</div>
<div class="city">
<div class="dotted"></div>
<div class="pulse1"></div>
<div class="pulse2"></div>
<div class="pulse3"></div>
</div>
</div>
</body>
</html>