<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#box {
width: 200px;
height: 200px;
background-image: url(./img/天气之子2.jpg);
background-size: 400px auto;
animation: xiaoxiaomantou 3s linear infinite;
}
/*
xiaoxiaomantou:动画名称
2s:动画时间
linear:匀速
infinite:规定动画应该无限次播放
*/
@keyframes xiaoxiaomantou {
100% {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div id="box"></div>
</body>
</html>
css 简单滴旋转动画
猜你喜欢
转载自blog.csdn.net/weixin_46474458/article/details/107484610
周排行