第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

為什么我的翻譯動畫不起作用?

為什么我的翻譯動畫不起作用?

尚方寶劍之說 2021-08-20 18:00:55
旋轉動畫正在工作。圖像的大小正在改變,但圖像的翻譯根本不起作用。我不知道為什么,我單獨嘗試了它,但它仍然不起作用。我還查看了十幾個其他人翻譯他們項目的示例,包括 codepen 上的示例。我的代碼幾乎是準確的,但它沒有產(chǎn)生任何結果。為什么會發(fā)生這種情況,我該如何解決?感謝您的任何建議或幫助。$("#toolbar").on("click", function() {    const speed = 500;        if ($('#toolbar').css("width") == "75px") {        $('#toolbar').css("transform", "translateX(250px)");                $('#toolbar').css("width", "70px");        // change toolbar rotation        $("#toolbar").animate({            deg: 0        }, {            duration: speed,            queue: false,            step: function(now) {                $(this).css({                    transform: "rotate(" + now + "deg)"                })            }        })    } else {        $('#toolbar').css("transform", "translateX(250px)");                $('#toolbar').css("width", "75px");        // change toolbar rotation        $("#toolbar").animate({            deg: 90        }, {            duration: speed,            queue: false,            step: function(now) {                $(this).css({                    transform: "rotate(" + now + "deg)"                })            }        })    }});#toolbar {    width:70px;    height:70px;    transition: transform 500ms linear;}<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><img id="toolbar" alt="toolbar" src="http://pngimg.com/uploads/cursor/cursor_PNG67.png">
查看完整描述

1 回答

?
精慕HU

TA貢獻1845條經(jīng)驗 獲得超8個贊

看,如果你想對你的元素應用多個變換(旋轉和平移,就像這里),你需要這樣做:

transform: rotate(90deg) translateX(30px);

但是在您的情況下,您只需先應用變換平移,然后用旋轉覆蓋它,如下所示:

transform: translateX(30px); //will not be working any more
transform: rotate(90deg); //override previous transform


查看完整回答
反對 回復 2021-08-20
  • 1 回答
  • 0 關注
  • 151 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號