$(this).css("animation","running")
改成
$(this).css("animation-play-state","running")
试一下
你确定你测试的浏览器兼容animation样式吗?
还有你有微animation写@keyframes吗?
<script type="text/javascript">$(document).ready(function() {
$("input").click(function() {
$(this).hide().fadeIn(700).addClass('b')//当前这个input先隐藏再渐显,你可以测试一下,如果不是你想要的效果,你可以查一下jq的渐隐效果函数或者animate()函数,控制这个input的透明度就好了,例如 $(this).animate(‘opacity’,‘0’);
//点击text增加b效果
$("body").one("click", function() {
$("input").removeClass("b")
//点击其他地方消除b效果
})
return false
})
})
<img id="i" src="#" style="width:100pxheight:100px"/> $("#i").animate({width: 400,height:400},500)这个看得懂吧
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)