jquery中animate的transform scale用法為什麼我老是沒有效果

時間 2021-08-30 09:43:55

1樓:柏影

可以通過addclass()方法來代替此動作:

比如想旋轉一個icon:

在css中加入一個class

[css] view plain copy

.add_transform{

transform:rotate(180deg);

-ms-transform:rotate(180deg);    /* ie 9 */

-moz-transform:rotate(180deg);   /* firefox */

-webkit-transform:rotate(180deg); /* safari 和 chrome */

-o-transform:rotate(180deg);    /* opera */

transition: all 0.5s ease-in-out;

-moz-transition: all 0.5s ease-in-out; /* firefox 4 */

-webkit-transition: all 0.5s ease-in-out; /* safari 和 chrome */

-o-transition: all 0.5s ease-in-out; /* opera */

然後通過$("選擇器").toggleclass(".add_transform");來使icon的旋轉變為動畫效果。

2樓:山水阿銳

.addw

.add

然後用jquery.addclass("addw").addclass("add");這樣就可以了!上stack overflow上收的也多半是這種辦發。

css3中的transform可以用jquery中的animate實現嗎?

3樓:郭某人來此

好像 jquery animate不支援-webkit-transform,我是試了很多遍都不成功!jquery.css()還支援,

.addw

.add

然後用jquery.addclass("addw").addclass("add");這樣就可以了!上stack overflow上收的也多半是這種辦發

4樓:匿名使用者

可以 但是明明能用transform解決的東西,為什麼要用jq呢? 有些本末倒置了~

5樓:free小_貓

**貼上來看看吧,

transform相容性不好,需要寫很多組,你jq裡怎麼寫的,還有你想達到什麼效果,未必一定要把transform用jq來寫的,寫在css裡,另起一個類名,切換類名也可以啊

jquery中animate函式的一些用法問題 100

6樓:匿名使用者

單位不一樣

$("#img1").animate(,1500); 這裡的100是100px

$("#img1").animate(,1500); 這裡的100%是高度為100%

如果要賦值的話

$("#img1").animate(,1500);

jQuery中的animate 方法,無效怎麼辦,求告知錯誤

單位不一樣 img1 animate 1500 這裡的100是100px img1 animate 1500 這裡的100 是高度為100 如果要賦值的話 img1 animate 1500 js問題 jquery問題 jquery的animate重複執行應該怎麼解決 this animate 10...

jquery中的是什麼意思,jquery中加 是什麼意思

是 jquery 常用的一個回傳函式,定義為 選取 英文是 selector 的縮寫 例子 function 就是 選取 jquery 定義的 function 執行 input 就是 選取 html 當中全部的 input 標籤 abc 就是 選取 html 當中 id 名稱為 abc 的物件 f...

JQuery中怎麼得到this中的某個元素

o心隨緣飄 this find radio attr checked true 找到在a標籤裡面的radio,選中 批發豌豆顛顛 this css children input type radio prop checked checked 2011 01 07.尷尬 戳小遠 this find i...