【发布时间】:2013-05-07 16:35:58
【问题描述】:
我有flipIt() 翻转图像的功能。但我想要做的是当用户单击图像时,必须创建一个动态 div(背景和一些文本),然后在翻转图像时该 div 必须可见。
这个小提琴不起作用请帮忙。
http://jsfiddle.net/RQ62f/13/
$("img").click(function(){
alert('m called');
$(this).wrap('<div class="foobar"/>');
$(this).css("-webkit-transform-style","preserve-3d");
$(this).css("-webkit-transition","all 1.0s linear");
$(this).css("transform-style","preserve-3d");
$(this).css("transition","all 1.0s linear");
$(this).css("-webkit-transform","rotateY(180deg)");
$(this).css("transform","rotateY(180deg)");
});
【问题讨论】:
-
你有一个额外的 '.'在 jsfiddle 内的代码中使用“flipIt($(this).);”错误更正jsfiddle.net/RQ62f/15
-
从侧边栏添加 jquery。
-
类似this?
-
但图像没有翻转 ..flipit() 在这里不起作用
-
希望我的回答对您有所帮助,您可以在这里说出确切的问题