.: Selamat datang di blog Ferdi Setiawan! :.: PERHATIAN! (9 JULI 2018) Mohon maaf atas ketidaknyamanannya. Blog ini saya nyatakan TIDAK AKTIF. Blog terbaru saya adalah sebagai berikut: Ferdi Huang :.: Terima kasih! :.

26 Agustus 2013

HTML Code: How to Stop Marquee When Cursor Moving

The HTML Code is one of many blog's builder. Today, I will share to you about marquee code. A marquee is a walking text in a place of a blog. For example is below:

This is the marquee text. This text is walking from right to left.
The above marquee text has code. The code is <marquee>...</marquee>. For more information, please search by yourself on Google, here.

And as you know, I don't discuss about marquee text too much. And back to our topic, how to stop marquee text when cursor moving.

In the HTML coding, there are many codes which performs different actions, for example:
  • color
  • behavior
  • etc.
But we don't use code above [ color ; behavior ]. But we use:
  • onmouseover
  • onmouseout
To stop the marquee when cursor over, you can add onmouseover="stop()" code. Look below!
<marquee onmouseover="stop()">
And to start the marquee when mouse is out, add onmouseout="start()" after code above.
<marquee onmouseover="stop()" onmouseout="start()">
If you're success, the result will appear as below:
Hey! This is marquee text! Please direct your mouse to me (this text) to apply the effect!

So easy, huh? Happy coding :D

Tidak ada komentar:

Posting Komentar

Harap tinggalkan komentar jika terdapat tautan yang rusak atau bertanya seputar artikel ini!

Buku Tamu | Guestbook