老师麻烦看下我的答案,是这个意思吗?
来源:2-18 编程练习
weixin_慕沐1378591
2020-10-29 16:53:00
是我的思路不对,还是说就是这样 ...
<!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);
/*此处写代码*/
bottom: 100px;
animation: goDown 0.5s linear 1s infinite alternate;
}
@keyframes goDown{
from{
bottom: 100px;
}
to{
bottom: 70px;
}
}
</style>
</head>
<body>
<div>></div>
</body>
</html>
1回答
同学你好,是这个意思,有个小错误需要注意:
animation属性连写时,第一个时间参数代表运动过程持续的时间,第二个时间参数设置的是延时,同学设置反了,如下:
修改后,效果就正确了。
祝学习愉快!
相似问题