Copy code The code is as follows:<BODY> //With the help of marquee <MARQUEE behavior="scroll" contenteditable="true" onstart="this.firstChild.innerHTML+=this.firstChild.innerHTML;" scrollamount="3" width="100"> <SPAN unselectable="on">Here is the content to scroll</SPAN> </MARQUEE> //Ordinary implementation method <DIV id="scrollobj" style="white-space:nowrap;overflow:hidden;width:500px;"> <span>Here is the content to scroll</span> </DIV> <script language="javascript" type="text/javascript"> function scroll(obj) { var tmp = (obj.scrollLeft)++; //When the scroll bar reaches the top right if (obj.scrollLeft==tmp) obj.innerHTML += obj.innerHTML; //When the scroll bar scrolls the width of the initial content, the scroll bar returns to the leftmost end if (obj.scrollLeft>=obj.firstChild.offsetWidth) obj.scrollLeft=0; } setInterval("scroll(document.getElementById('scrollobj'))",20); </script> </BODY> |
<<: A practical record of an accident caused by MySQL startup
>>: VUE render function usage and detailed explanation
Several typical values of innodb_flush_method f...
1. Introduction tr is used to convert or delete a...
<br />I have written two articles before, &q...
Table of contents 1. Vue3 component communication...
Preface: Speaking of sandboxes, our minds may ref...
This article shares the summary of the JS mineswe...
1. Install cmake 1. Unzip the cmake compressed pa...
This article describes MySQL 8.0 user and role ma...
Basic Concepts Absolute positioning: An element b...
We often encounter this problem: how to use CSS t...
During the Olympic Games, IE 8 Beta 2 will be rele...
Preface I recently installed MySQL 5.7 and found ...
Table of contents 1. Installation and introductio...
This article shares the specific code of JavaScri...
Putting input and img on the same line, the img ta...