使用纯CSS实现日出日落效果
使用纯CSS实现日出日落效果
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>东升西落</title>
<style type="text/css">
.ship {
animation-name: move-ship;
animation-duration: 40s;
}
.clouds {
animation-name: move-clouds;
animation-duration: 40s;
}
.sun-small {
animation-name: move-sun;
animation-duration: 10s;
}
.comet {
animation-name: move-comet;
animation-duration: 10s;
}
@keyframes move-comet {
100% {
transform: translate(400px, 375px);
}
}
@keyframes move-clouds {
to {transform: translateX(-1000px);}
}
@keyframes move-sun {
to {transform: translate(350px, -400px);}
}
@keyframes move-ship {
to {transform: translateX(1000px);}
}
</style>
</head>
<body>
<head>
<title>Водное путешествие</title>
<meta charset="utf-8">
<base href="https://htmlacademy.ru/assets/course80/">
<link rel="stylesheet" href="epoch1.css">
</head>
<body class="ancient-world">
<div>
<div class="comet"></div>
<div class="sun-small"></div>
<div class="clouds"></div>
<div class="water"></div>
<div class="ship"></div>
</div>
</body>
</body>
</html>.
相关推荐
qiupu 2020-11-04
jiedinghui 2020-10-25
Ladyseven 2020-10-22
hellowzm 2020-10-12
zuncle 2020-09-28
Ladyseven 2020-09-11
jiedinghui 2020-09-07
xiaohuli 2020-09-02
葉無聞 2020-09-01
impress 2020-08-26
ThikHome 2020-08-24
nicepainkiller 2020-08-20
hellowzm 2020-08-18