Home  >  Article  >  Web Front-end  >  Horizontal uninterrupted text scrolling implemented by js_javascript skills

Horizontal uninterrupted text scrolling implemented by js_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:12:591167browse

The tag I originally thought of was because it enables horizontal scrolling. The manager said that its starting position comes from the far right. Can it be changed to come out from the middle or from the far left? After checking the relevant information, I found out that cannot specify the starting position. Later, I found a piece of code on the Internet, which was implemented using pictures. After I changed the pictures into text, I successfully realized the function I wanted. The code is as follows:


[Ctrl A Select all Note:
If you need to introduce external Js, you need to refresh to execute
]

Here ${affiche.content } is the text taken out from the database.

The reason why this multiple repeated text is written in the div of scroll_begin is because the length of these texts must be larger than the div container of scroll_div. If it is smaller than the div, there will be no scrolling effect. In other words: the total width of the content for seamless scrolling must be greater than the width of the container.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn