jquery不在IE中工作
我用jQuery制作了一个简单的动画,但由于某些原因,在IE8和以前的版本中不起作用。这是我的密码:jquery不在IE中工作,jquery,internet-explorer-8,Jquery,Internet Explorer 8,我用jQuery制作了一个简单的动画,但由于某些原因,在IE8和以前的版本中不起作用。这是我的密码: $(document).ready(function(){ $('.circle.pink').animate({display: 'block'}, 800, function(){ $(this).animate({right: 446}, 1200, 'easeOutExpo') });
$(document).ready(function(){
$('.circle.pink').animate({display: 'block'}, 800, function(){
$(this).animate({right: 446}, 1200, 'easeOutExpo')
});
$('.circle.green').animate({display: 'block'}, 2000, function(){
$(this).animate({right: 20}, 800)
});
$('.circle.blue').animate({display: 'block'}, 2800).animate({right: -100}, 800, function(){
$(this).css('z-index', '4')
}).animate({right: 0}, 1000, 'easeOutExpo');
});
以下是html:
<div class="circles-wrap">
<div class="circle green"></div>
<div class="circle pink">
<article class="intro">
<span class="logo left"></span>
<p>Lorem ipsum....</p>
</article>
</div>
<div class="circle blue"></div>
</div>
知道它为什么不起作用吗?逗号似乎在正确的位置
提前感谢,
Maurodisplay不是可以在animate()中使用的css属性,animate需要具有数值的属性。
可能这是IE强制退出的错误。你能提供与此相关的html吗?对——Firefox通常会绕过这些属性错误,IE不会。可以在动画激发后使用回调函数,然后可以在其中隐藏元素,或者可以将不透明度设置为0。设置动画的持续时间后,应添加“、function(){$(element).hide();}”。。。或者加入不透明度动画。是的,我没想过。谢谢我使用了另一个具有数值的属性。顺便说一句,IE仍然是有史以来最愚蠢的浏览器没有处理你糟糕的编码是最愚蠢的吗?这就像走进餐厅点龙虾一样。他们告诉你菜单上没有龙虾,你就抱怨。你去另一家餐馆点了龙虾,他们给你带来了小牛肉,但你却很高兴地吃下了带出来的东西,即使这不是你想要的。
.circle{
width:514px;
height:514px;
display: block;
}
.circle.pink{ background:url('../images/c-pink.png'); position:absolute; right:0; z-index: 3;}
.circle.blue{ background:url('../images/c-blue.png'); position:absolute; right:0; z-index: 2;}
.circle.green{ background:url('../images/c-green.png'); position:absolute; right:0; z-index: 1;}