我创建了一个小型幻灯片。然而,它看起来并不是很顺利。如何使过渡看起来更平滑?
这是相关代码。 wod 在本例中是一个变量 350px 。 tranSpeed 为 1000,是动画发生的时间。我尝试将其设置为不同的值,但仍然得到相同的锯齿状外观。
$('#slideShowInner').stop(true,true).animate({'left':'-=' + wod}, tranSpeed, function (){ autoSlide = setTimeout(fred, slidetime) });
你可以在 http://www.en2krew.com/clothing.html 明白我的意思
谢谢
这里是使用的 html 代码:
<div id="slideShowWindow">
<div id="slideShowInner">
<img src="images/clothingphotos/sonnytshirt.jpg" alt="" width="350" height="350" />
<img src="images/clothingphotos/bethtshirt.jpg" alt="" width="350" height="350" />
<img src="images/clothingphotos/mayaelliejesstshirt.jpg" alt="" width="350" height="350" />
<img src="images/clothingphotos/alfiemilessebtshirt.jpg" alt="" width="350" height="350" />
<img src="images/clothingphotos/geehat.jpg" alt="" width="350" height="350" />
<img src="images/clothingphotos/aaronhat.jpg" alt="" width="350" height="350" />
</div>
<div id="buttons">
<img id="clickPrev" src="images/prevButton.jpg" height="17" width="15" />
<img id="clickNext" src="images/nextButton.jpg" height="17" width="15" />
<div id="pauseHolder">
<img class="clickMe" id="clickPause" src="images/pauseButton.jpg" height="17" width="15" />
</div>
<div class="clearer"></div>
<!-- buttons--></div>
<!-- slideShowWindow --></div>
最佳答案
【答案大修】
我和我的 friend 谷歌进行了研究。
结果可能是 IE、jQuery 和 <p>
标签。
更改 <p>
是为了别的事情。
关于jquery - 动画不是很流畅,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4184703/