transform-rotate旋轉


<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        .box{
            width: 300px;
            height: 300px;
            background-color: red;
            margin:100px auto;

            transition:all 1s;
            color:#fff;
            font-size:50px;

        }


        /* rotate(角度) 旋轉
            正值 順時針
            賦值:逆時針
        */
        .box:hover{
            transform:rotate(-945deg);
        }

        .out{
            width: 300px;
            height: 150px;
            background-color: pink;
            margin-top:200px;
            position: relative;
        }

        .out::before{
            content:"";
            position: absolute;
            width: 50px;
            height: 50px;
            background-color: pink;

            transform:rotate(45deg);
            left:40%;
            top:-15px;

        }
    </style>
</head>
<body>
    <div class="box">1</div>

    <div class="out">

    </div>
</body>
</html>

 


免責聲明!

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



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