请问这样是正确的吗。谢谢。
来源:2-20 编程练习
慕斯卡2474635
2021-07-13 17:01:51
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>2-4</title>
<style type="text/css">
div {
font-family: 'Microsoft Yahei';
font-size: 60px;
font-weight: bold;
line-height: 600px;
position: absolute;
top: -1000px;
right: 0;
left: 0;
width: 800px;
height: 600px;
margin: auto;
text-align: center;
border: 5px solid #000;
border-radius: 50%;
animation-name: disp;
animation-duration: 1s;
/*此处写代码*/
animation: r 2s linear 2s;
}
@keyframes r {
from {
top: -1000px;
}
to {
top: 0;
}
}
</style>
</head>
<body>
<div>大家好,欢迎来到慕课网!</div>
</body>
</html>
1回答
好帮手慕然然
2021-07-13
同学你好,代码实现效果没问题,不过以下位置处:animation-name属性和animation-duration属性设置重复了,建议优化一下,如图
祝学习愉快!
相似问题