jQuery .rotate()不起作用 [英] jQuery .rotate() doesn't work
本文介绍了jQuery .rotate()不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不知道为什么它不起作用.我正在使用jQuery 2.1.0
I don't know why it don't work. I am using jQuery 2.1.0
我有此代码:
$("a.shownav img").rotate(180);
如何使用插件不使它工作?
How can I make it work without using a plugin?
推荐答案
要使用.rotate()
,您需要添加 jqueryrotate 插件.这也可以使用纯jQuery和CSS来实现.
for using .rotate()
, you need to add jqueryrotate plugin. This can be also achieved using pure jQuery and CSS.
尝试一下:
$("a.shownav img").css({
"-webkit-transform": "rotate(180deg)",
"-moz-transform": "rotate(180deg)",
"transform": "rotate(180deg)" /* For modern browsers(CSS3) */
});
这篇关于jQuery .rotate()不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文