<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>动画暂停</title>
<style type="text/css">
*{
padding: 0;
margin: 0;
}
ul,ol{
list-style: none;
}
a{
text-decoration: none;
color: #000000;
}
img{
border-radius: 50%;
border: 1px solid #000000;
/*调用动画*/
-webkit-animation: rotate 4s linear infinite;
}
/*定义动画旋转一周*/
@-webkit-keyframes rotate {
0%{
transform: rotate(0deg);
}
100%{
transform: rotate(360deg);
}
}
/*鼠标悬停,动画暂停*/
img:hover{
-webkit-animation-play-state: paused;
}
</style>
</head>
<body>
<img src="image/4.png">
</body>
</html>
动画暂停
最新推荐文章于 2023-02-27 10:35:17 发布