Hover Over to Pause Marquee

前端 未结 7 2080
无人及你
无人及你 2021-01-08 00:29

I want to create a Marquee that scrolls some news articles but when the user hovers over it I need it to pause and when the user hovers out of it (onMouseOut) I need to ti s

相关标签:
7条回答
  • 2021-01-08 00:35
    <marquee onmouseover="this.stop();" onmouseout="this.start();">
    my text here
    </marquee>
    

    You're using wrong case: onMouseOver,onMouseOut

    0 讨论(0)
  • 2021-01-08 00:35
    <marquee behavior="scroll" scrollamount="5" direction="left" onmouseover="this.setAttribute('scrollamount',0);" onmouseout="this.setAttribute('scrollamount',5);">
     Your name, your address, your details scrolling through line
    </marquee>
    

    Hope this code will help someone who is use MARQUEE tag.

    0 讨论(0)
  • 2021-01-08 00:37
    <marquee id="mq" direction="right" loop="true" onmouseover="this.stop();" onmouseout="this.start();">
        <a href="http://google.com">Google</a>
        <input type="text" id="txt" />
        <input type="button" id="btn" value="Click here" onclick="alert(txt.value);" />
        Some other text here</marquee>
    
    0 讨论(0)
  • 2021-01-08 00:39

    You can simply use the HTML marquee markup with

    onmouseover="stop()"
    

    followed by

    onmouseout="start()"
    
    0 讨论(0)
  • 2021-01-08 00:41

    <marquee behavior="scroll" direction="left" onmouseover="this.stop();" onmouseout="this.start();">
        Go on... hover me (and hold the mouse over)!
    </marquee>

    0 讨论(0)
  • 2021-01-08 00:49

    You have to add ; to your code after closing the () .

    0 讨论(0)
提交回复
热议问题