Marquee HTML Code Example to Pause onmouseover
Today i have been trying hard to create a marquee which can be paused when we take the cursor over it. However it took me an hour to do so but in the end the answer was very simple. I am sharing it with you now.
Code:
<marquee behavior="scroll" direction="left" onmouseover="this.stop();" onmouseout="this.start();">It will pause onMouseOver</marquee> |
Result:
When you will take your mouse over the scrolling text, it will pause there and when you take it out, it will resume. This functionality is provided by two events : onmouseover and onmouseout.
This code looks very simple but you can use it in very interesting style. Inspite of writing the text inside marquee, you can put some images or some links to give a good look to your website. I will show you one such example below.
No comments:
Post a Comment