The label I first came up with is <marquee> because it can implement horizontal scrolling. The manager said that its starting position is from the rightmost. Can it be changed to the center or the leftmost. After checking the relevant information, you can see that <marquee> cannot specify the start position. Later, I found a piece of code on the Internet, which was implemented using images. After I changed the image into text, I successfully realized what I wanted. The Code is as follows:
<Style type = "text/css"> # gongao {width: 1000px; height: 30px; overflow: hidden; line-height: 30px; font-size: 13px; font-family: ' '; background: # DDE5ED; color: # 0C77CF; font-weight: bold ;}# gongao # scroll_begin, # gongao # scroll_end {display: inline} </style >$ {affiche. content }$ {affiche. content }$ {affiche. content }$ {affiche. content }$ {affiche. content }$ {affiche. content}
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Here $ {affiche. content} is the text obtained from the database.
The reason why this multi-repeating text is written in the div of scroll_begin is that the length of the text must be greater than the div container of scroll_div. If it is less than div, it will not always scroll.
In other words, the content width of seamless scrolling must be greater than the container width.