CSS3 邊框彩虹跑馬燈


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

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>border ranbom</title>
    <style>
        .rbox {
            width: 320px;
            height: 240px;
            /* border: 3px solid #ccc; */
            position: absolute;
            left: 200px;
            top: 200px;
            overflow: hidden;
            border-radius: 10px;
        }

        .rbox .inner {
            width: 520px;
            height: 520px;

            background-image: linear-gradient(-60deg, red, yellow);
            animation: rbox 3s linear infinite;
            position: absolute;
            left: -100px;
            top: -100px;




        }

        .rbox .content {
            
            background: white;
            position: absolute;
            left: 6px;
            right: 6px;
            top: 6px;
            bottom: 6px;
            border-radius: 6px;
        }

        @keyframes rbox {
            from {
                transform: rotate(0deg);
            }

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

<body>


    <div class="rbox">
        <div class="inner">

        </div>
        <div class="content">
            sfsdf
        </div>

    </div>

</body>

</html>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM