请老师检查

来源: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>&gt;</div>
</body>
</html>


写回答

1回答

好帮手慕星星

2021-03-19

同学你好,建议将箭头初始定位在页面更符合效果一些,如下:

http://img.mukewang.com/climg/60546b51098cd2c804750381.jpg

动画没有问题,很棒!

祝学习愉快~

0

0 学习 · 15276 问题

查看课程