请老师检查下代码,谢谢
相关代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>2-9</title>
<style type="text/css">
div {
font-family: Arial;
font-size: 72px;
font-weight: bold;
position: fixed;
right: 0;
left: 0;
width: 30px;
height: 30px;
margin: auto;
transform: rotate(90deg);
/*此处写代码*/
text-align: center;
bottom: 8%;
animation: move 2s linear .5s infinite;
}
@keyframes move {
0% {
bottom:8%;
}
20% {
bottom: 3%;
}
40% {
bottom: 4%;
}
60% {
bottom: 2%;
}
80% {
bottom: 4%;
}
100% {
bottom: 3%;
}
}
</style>
</head>
<body>
<div>></div>
</body>
</html>
12
收起
正在回答
1回答
同学你好,动画实现效果不太流畅,建议优化一下,参考代码如下:
祝学习愉快!
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星