transform顺序问题

transform顺序问题

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>3-1作业</title>
    <style>
        div {
            font-size: 14px;
            font-weight: bold;
            line-height: 50px;
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            width: 200px;
            height: 50px;
            margin: auto;
            cursor: pointer;
            text-align: center;
            background: #abcdef;
            transform: rotate(0deg);
            transition: transform 2s linear 0s;
           
        }
        div:hover{
            transform:  scale(2)  rotate(360deg);
         
           
        }
       
    </style>
</head>
<body>
    <div>www.imooc.com</div>
</body>
</html>

问题描述:

老师好,为什么旋转不生效,把rotate(360deg) 放到scale(2)前面旋转就生效了

正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

1回答
好帮手慕小李 2023-08-03 11:46:15

同学你好,如下:

https://img1.sycdn.imooc.com//climg/64cb23010995548d08220658.jpg

将图中红色箭头指向的代码注释后再试试。

祝学习愉快!

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师