请老师检查
来源:2-18 编程练习
KangarooL
2021-03-19 17:04:10
相关代码:
<!DOCTYPE html>
<html>
<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);
/*此处写代码*/
animation:xhjt 1s linear 0.5s infinite;
}
@keyframes xhjt {
from {
transform:rotate(90deg) translate(0,0);
}
to {
transform:rotate(90deg) translate(20px,0);
}
}
</style>
</head>
<body>
<div>></div>
</body>
</html>
1回答
同学你好,建议将箭头初始定位在页面更符合效果一些,如下:
动画没有问题,很棒!
祝学习愉快~
相似问题