让某一个字从左向右移动的代码怎么写

让某一个字从左向右移动的代码怎么写

<html>

<head>
    <meta charset="utf-8">
    <style>
        @keyframes run{
            from{
                right: 90%;
            }
            to{
                right: 0%;
            }
        }
        .test {
            position: absolute;
            display: inline-block;
            border: 1px solid black;
            animation: 20s run;
        }
    </style>
</head>

<body>
    <span class="test">文字</span>
</body>

</html>

温馨提示:答案为网友推荐,仅供参考
相似回答