For a long time, many Internet visitors do not feel like random guests in virtual reality. Moreover, it is now easier than ever to acquire your own place for work, rest or communication in the global network. And after such a place - a website or a page - appears, I want to make it more beautiful, more informative, more convenient. One of the ways to get the desired result is to place some of the information or pictures in the crawl line on the site.
The easiest way to insert a creeping line into a website page is to use ready-to-use HTML-code, which is provided for free by many Internet resources. This option will be optimal, for example, if you need to place a news feed, stock quotes, game portal information, etc. on your website pages. In this case, you need to find the ready-made code on the pages of the selected Internet resource, copy and paste it into the desired place in the HTML code of the page of your site. This option is convenient not only because you don’t need to know the scripts that create the creeping line, but you also don’t have to worry about filling such a feed with information - this will be done automatically by the site where the creeping line code is taken from. If you need to fill the creeping line with your own information or pictures, you will have to compose its code yourself. The easiest way to do this is using a special HTML tag - marquee. It consists of opening and closing parts, the first of which contains additional information - attributes. This is service data that tells the visitor's browser what font and color should be displayed for the text of the creeping line, in which direction the movement should be directed, the width, height and background of the window of this line, etc. And between the opening and closing tags, the text of the news feed itself is placed. For example, in its simplest form, the code might look like this: this is the crawl text Here, only the width and height of the block in pixels (the width and height attributes) and the scrolling text are specified. The direction of movement is specified by the direction attribute, which can be assigned one of four values in English (right, left, up, down). By default, the crawl text is looped - its beginning is attached to its end, which will move in the same direction. If you use the behavior attribute with the value alternate, then the text, reaching the right border of the window, will reverse direction and will infinitely bounce off two opposite sides (left and right or top and bottom). Another important attribute of the scrolling line is scrollAmount. It sets the speed at which the text moves in relative units - 1 means the slowest movement, 2 means a little faster, etc. With the help of attributes, you can set the delay before the beginning of scrolling of the scrolling line, the number of cycles and the pause between them, the indents from the text to the border of the window of this element.