88 lines
1.9 KiB
HTML
88 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>相框掉落</title>
|
|
<style>
|
|
html {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: url("qiang.jpg");
|
|
position: relative;
|
|
animation: doudong 0.3s 4 reverse;
|
|
overflow: hidden;
|
|
}
|
|
.box {
|
|
width: 400px;
|
|
border: 10px solid #000;
|
|
background: url("./xk_1.jpeg");
|
|
background-size: contain;
|
|
height: 248px;
|
|
margin: 0 auto;
|
|
position: absolute;
|
|
left: 50%;
|
|
margin-left: -200px;
|
|
animation: qxie 0.1s ease-out 1.5s forwards;
|
|
transform-origin: 0px 0px;
|
|
}
|
|
|
|
@keyframes doudong {
|
|
0% {
|
|
background-position: 0 0;
|
|
left: 0;
|
|
}
|
|
50% {
|
|
background-position: 10px 0;
|
|
left: 10px;
|
|
|
|
}
|
|
100% {
|
|
background-position: 0 0;
|
|
left: 0;
|
|
}
|
|
}
|
|
|
|
|
|
@keyframes qxie {
|
|
0% {
|
|
top: 0;
|
|
transform: rotate(0deg);
|
|
}
|
|
50% {
|
|
top: 0;
|
|
transform: rotate(60deg);
|
|
}
|
|
70% {
|
|
top: 50%;
|
|
transform: rotate(60deg);
|
|
}
|
|
80% {
|
|
top: 70%;
|
|
transform: rotate(60deg);
|
|
}
|
|
100% {
|
|
top: 100%;
|
|
transform: rotate(60deg);
|
|
}
|
|
}
|
|
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
|
|
|
|
<div class="box"></div>
|
|
|
|
|
|
|
|
</body>
|
|
</html> |