jquery 获取css3动画animation的值,改变animation的值问题

jquery 获取css3动画animation的值,改变animation的值问题,第1张

把上面的

$(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)

这个看得懂吧


欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/bake/11365790.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-15
下一篇 2023-05-15

发表评论

登录后才能评论

评论列表(0条)

保存