Вопрос

I have seen in many websites that the text which is flowing stops as soon as we hover our mouse over it , like in this site ,http://www.sofworld.org, how is it done ?

Это было полезно?

Решение 2

See the source code of that page ,

<marquee 
 onmouseout="this.setAttribute('scrollamount', 6, 0);" 
 onmouseover="this.setAttribute('scrollamount', 0, 0);"
 scrolldelay="150" scrollamount="6">
  Text
</marquee>

Другие советы

Just look at the html at the page you posted:

<marquee 
  onmouseout="this.setAttribute('scrollamount', 6, 0);" 
  onmouseover="this.setAttribute('scrollamount', 0, 0);"
  scrolldelay="150" scrollamount="6">
    Text
</marquee>

The setAttribute() method simply changes the attribute scrollamount from 6 to 0 on mouseover, and back to 6 on mouseout. Im not sure what the third parameter does, i just copied the html from your example page.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top