2-18编程练习
来源:2-18 编程练习
weixin_慕的地2217823
2022-10-19 18:59:51
<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:v 1s linear 0.5s infinite forwards;
}
@keyframes v{
from{
bottom:0;
}
to{
bottom:20px;
}
}
</style>
</head>
<body>
<div>></div>
</body>
</html>
1回答
imooc_慕慕
2022-10-20
同学你好,
同学你好,箭头下移过程中有部分超出了(字体大小比30px大导致的)
建议优化一下动画,调整位置:
祝学习愉快~
相似问题