圆环

作者: c59ffede9db6 | 来源:发表于2017-04-22 05:10 被阅读0次

    思路:div套div的形式,这样transform-origin就不会变

    <!DOCTYPE html>
    <html>
    <head>
        <title></title>
        <meta charset="utf-8">
        <style type="text/css">
            .box{
                width: 100px;
                height: 100px;
                border-radius: 50px;
                background: red;
            }
            .box1
            {
                width: 100px;
                height: 100px;
                border-radius: 50px;
                background:blue;
                transform: scale(0.5,0.5);
            }
            .box2{
                width: 100px;
                height: 100px;
                border-radius: 50px;
                background:#f60;
                transform: scale(.8,0.8);
            }
        </style>
    </head>
    <body>
    <div class="box">
        <div class="box1">
            <div class="box2">
            
        </div>
        </div>
        
    </div>
    
    </body>
    </html>
    

    相关文章

      网友评论

          本文标题:圆环

          本文链接:https://www.haomeiwen.com/subject/indrzttx.html