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
Table of contents 1. Introduction to ReactJS 2. U...
Select and change: click to display the current v...
Table of contents Overview Hash Properties Host p...
origin Recently, I am working on requirement A, i...
Introduction Recently I found that there is an AR...
These specifications are designed to allow for bac...
The default database of CentOS7 is mariadb, but m...
Table of contents 1. Prepare the springboot proje...
Usually the goal of building a website is to have...
How to write configuration files and use MyBatis ...
Table of contents 1. Interface effect preview 2.u...
ContentsHyperledger fabric1.4 environment setup u...
WeChat applet form validation, for your reference...
*******************Introduction to HTML language (...
Table of contents Preface: 1. Reasons for the eve...