辛苦老师检查

来源:2-18 编程练习

Lanny_Chung

2022-03-16 10:57:32

<!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);
            /*此处写代码*/
            bottom:40px;
            animation:sports .5s ease .5s alternate infinite;
            
        }
        @keyframes sports{
            from{
                bottom:40px;
            }
            to{
                bottom:10px;
            }
        }
    </style>
</head>
<body>
    <div>&gt;</div>
</body>
</html>


写回答

1回答

好帮手慕星星

2022-03-16

同学你好,动画效果可以的,但是箭头在水平方向上没有水平居中显示,超出了盒子大小

https://img.mukewang.com/climg/62315a5c09dd047919200105.jpg

建议设置盒子大一些,并且设置文字水平垂直居中显示,如下

https://img.mukewang.com/climg/62315b4409b1fed804690223.jpg

祝学习愉快!

0

0 学习 · 17877 问题

查看课程