简易loading动画的制作

实现效果

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简易加载动画</title>
    <style>
        body{
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        div {
            width: 100px;
            height: 100px;
            border-radius: 100px;
            border-width: 10px;
            border-color: orange orange  transparent orange;
            border-style: solid;
            animation: spin 1s infinite linear;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }
    </style>
</head>

<body>
    <h3>简易加载动画</h3>
    <div></div>
</body>

</html>
posted @ 2021-01-10 15:29  时光傀儡师  阅读(112)  评论(0编辑  收藏  举报