JS magic Hall: Information scrolling through the marquee tag
1. The limited space in the preface shows infinite content, which is the most commonly used place for scrolling. There are many implementation methods based on the information scrolling effect, but the marquee tag that comes with HTML is a simple implementation method. Record the following information for future reference. Ii. Basic Knowledge example of the marquee tag: <marquee behavior = "scroll" direction = "left" loop = "-1" scrollAmount = "12" scrollDelay = "42"> rolling Information </marquee> attribute behavior, scroll mode. Value alternate indicates rolling back and forth between the two ends; value scroll indicates repeatedly rolling from one end to the other end, which is the default value; value slide indicates rolling from one end to the other end without repeating. Direction: the direction of scrolling. Optional values: left (default), right, up, and down. Loop, the number of times of scrolling. The default value is-1. ScrollAmount, set the step size for one scroll. The default value is 6. When it is set to a negative number, the default value is used for scrolling. ScrollDelay: sets the delay time (unit: ms) between two scrolls ). The default value is 85. When it is set to a negative number, the default value is used for scrolling. 3. move the cursor to suspend and remove the scroll. <marquee onmouseover = "this. stop (); "onmouseout =" this. start (); "> rolling message </marquee> 4. Summary when we only need to implement the rolling effect of simple information such as a special announcement, the marquee tag is a good choice (although HTML5 has abolished it and it is recommended to replace it with CSS3 animation effects)