console.log('1');
jQuery('#inner-content').animate({
'width': jQuery('#inner-content-wrapper').width() + 'px'
}, {
duration: 800,
queue: false,
complete: function(){
console.log('2');
}
});
console.log('3');
控制台输出 Chrome v28 :1,3,2
控制台输出 Firefox v23 :1,3 动画有效,但从未执行完成,这在IE 10中也不起作用
HTML
<div id="content">
<div id="inner-content-wrapper" class="wrap clearfix">
<div id="inner-content" class="wrap clearfix">
</div>
</div>
</div>
计算风格内容
box-sizing: border-box;
color: rgb(0, 0, 0);
display: block;
font-family: sans-serif;
font-size: 16px;
height: 243px;
line-height: 24px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 70px;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
width: 1756px;
Computed Style inner-content-wrapper
box-sizing: border-box;
color: rgb(0, 0, 0);
display: block;
font-family: sans-serif;
font-size: 16px;
height: 243px;
line-height: 24px;
margin-bottom: 0px;
margin-left: 378px;
margin-right: 378px;
margin-top: 0px;
max-width: 1000px;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
width: 1000px;
zoom: 1;
计算样式内包装
background-color: rgba(255, 255, 255, 0.85098);
box-sizing: border-box;
color: rgb(0, 0, 0);
display: block;
float: right;
font-family: sans-serif;
font-size: 16px;
height: 243px;
line-height: 24px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
max-width: 1000px;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 50px;
position: relative;
width: 1000px;
zoom: 1;