The automatic scrolling effect of the page can be achieved by JavaScript, but today I accidentally discovered an HTML tag - <marquee></marquee> which can achieve a variety of scrolling effects without JS control. The marquee tag can be used to move not only text, but also images, tables, etc. Syntax: <marquee>...</marquee>; Description: Add the content to be scrolled between the tags. Important properties: 1. Scroll direction (including 4 values: up, down, left and right) Syntax: <marquee direction="scroll direction">...</marquee> 2. Scrolling behavior (scroll: scroll in a loop, the default effect; slide: scroll once and then stop; alternate: scroll back and forth alternately) Syntax: <marquee behavior="scroll mode">...</marquee> 3. Scroll speed scrollamount (scroll speed is to set the length of movement each time you scroll, in pixels) Syntax: <marquee scrollamount="5">...</marquee> 4. Scroll delay scrolldelay (set the scrolling time interval in milliseconds) Syntax: <marquee scrolldelay="100">...</marquee> 5. Scroll loop (the default value is -1, the scroll will continue to loop) Syntax: <marquee loop="2">...</marquee> 6. Scroll range width, height 7. Scrolling background color bgcolor 8. Blank space hspace, vspace Code example: XML/HTML CodeCopy content to clipboard
The above is all the content of the simple method (must read) of using HTML tag marquee to achieve scrolling effect. I hope you like it~ |
<<: A brief discussion on the issue of element dragging and sorting in table
>>: How to set remote access permissions in MySQL 8.0
In the previous article https://www.jb51.net/arti...
Recently, I used the webSocket protocol when work...
This week has been as busy as a war. I feel like ...
Most navigation bars are arranged horizontally as...
Table of contents 1. Union Type 2. Crossover Type...
The downloaded version is the Zip decompression v...
The virtual machine I rented from a certain site ...
This article example shares the specific code of ...
Table of contents Preface 1. Startup management b...
You can use the attribute in HTML5 <input="...
Preface When testing, in order to test the projec...
MySQL 5.7.21 winx64 free installation version con...
Import the data exported from the Oracle database...
Table of contents Controller type of k8s Relation...
1. Why write this article? You must have read a l...