[英]fade in and out from right to left
The problem is that you get the distortion by reducing the width of the image. 问题在于您会通过减小图像的宽度来获得失真。 Try to wrap the image in the div:
尝试将图像包装在div中:
<div id="main">
<div id="img1">
<img src="..."/>
</div>
<div id="img2">
<img src="..."/>
</div>
</div>
$("#img2").animate({ width: 'toggle', height:'340', opacity: 'toggle' }, "slow");
Simple example: https://jsfiddle.net/12x4cauv/ 简单示例: https : //jsfiddle.net/12x4cauv/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.