我希望我的div中的内容能够连续水平滚动,但它不起作用。任何帮助将不胜感激
<div id="mydivid">This text needs to be scrolled horizontally continuously</div>
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery("#mydivid")
.stop()
.animate({ left: "-=100px" }, 2000 );
});
</script>
答案 0 :(得分:1)
使用此Demo Here
您只需使用marquee
<div id="mydivid"><marquee>This text needs to be scrolled horizontally continuously</marquee></div>