-
Notifications
You must be signed in to change notification settings - Fork 0
/
04.html
68 lines (61 loc) · 1.34 KB
/
04.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body {
background: #eee;
}
div {
position: relative;
margin: 50px auto;
width: 100px;
height: 100px;
box-sizing: border-box;
background-color: deeppink;
line-height: 120px;
text-indent: 5px;
}
div::before {
content: "";
position: absolute;
left: 0px;
top: 0;
right: 0;
bottom: 0;
-webkit-clip-path: polygon(0 0, 0 100px, 100px 100px, 0 0);
background: #fff;
/* border: 1px solid #333; */
transform: translateX(0px);
/* animation: move 5s 1 linear; */
}
div::after {
content: "";
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
-webkit-clip-path: polygon(100px 99px, 100px 0, 1px 0, 100px 99px);
background: #fff;
/* border: 1px solid #333; */
transform: translateX(0px);
/* animation: move 5s infinite linear; */
}
@keyframes move {
40% {
transform: translateX(0px);
}
100% {
transform: translateX(0px);
}
}
</style>
</head>
<body>
<div></div>
</body>
</html>