扫码关注官方订阅号
我想的是让p旋转后消失,但是测试的时候p是直接消失的,请教大家怎么解决?
人生最曼妙的风景,竟是内心的淡定与从容!
你在调用animate时,设置 回调函数就好了,不要用Delay,而且100毫秒不够,太少了
$(this).animate({ rotate:"85deg" },function(){ //hide });
另外,此处应该用CSS3动画,比Jquery animate性能好
#di.active{ transform:rotate(45deg); -webkit-transform:rotate(45deg); transition:all 2s; -webkit-transition:all 2s; }
$("#di").click(function(){
$(this).addClass("active").hide(2000);
});
$(function() {
$("#di").click(function() { $(this).animate({ rotate: "85deg" }, 100).hide(800); });
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
你在调用animate时,设置 回调函数就好了,不要用Delay,而且100毫秒不够,太少了
另外,此处应该用CSS3动画,比Jquery animate性能好
$("#di").click(function(){
});
$(function() {
});