做一个内涵丰富、身体健康、思想开放、有毅力的能力者

横向菜单和滚动停止

var textMarquee = document.getElementById('textMarquee');

    function stopScroll() {
        textMarquee.stop();
    }

    function startScroll() {
        textMarquee.start();
    }


<div id="scrollingText" style="overflow: hidden; height: 50px;">
<marquee id="textMarquee" behavior="scroll" direction="up" onmouseover="stopScroll()" onmouseout="startScroll()">
    这里是循环向上滚动的文字。这里是循环向上滚动的文字。
</marquee>

添加新评论