Copy code The code is as follows:<html> <head> <style type="text/css"> <!-- #demo { background: none repeat scroll 0 0 #FFFFFF; border: 1px solid #98CBFF; margin-bottom: 10px; margin-left: 5px; overflow: hidden; padding: 0 0 5px; width: 948px; } #demo img { border: 3px solid #F2F2F2; } #indemo { float: left; width: 800%; } #demo1 { float: left; } #demo2 { float: left; } .box { border: 1px solid #98CBFF; float: left; margin: 7px 10px; overflow: hidden; padding: 5px; width: 150px; } --> </style> </head> <body> Image scrolls left seamlessly Scrolls left Copy code The code is as follows:<div id="demo"> <div id="indemo"> <div id="demo1"> <div class="box"> <a href="#"><img src="upload/2022/web/Clear_logo.gif" border="0" /></a> <p>Your number</p> hello </div> <div class="box"> <a href="#"><img src="upload/2022/web/Clear_logo.gif" border="0" /></a> <p>idiot</p> stupid </div> <div class="box"> <a href="#"><img src="upload/2022/web/Clear_logo.gif" border="0" /></a> </div> </div> <div id="demo2"></div> </div> </div> <script> <!-- var speed=10; //The larger the number, the slower the speed var tab = document.getElementById("demo"); var tab1=document.getElementById("demo1"); var tab2 = document.getElementById("demo2"); tab2.innerHTML=tab1.innerHTML; function Marquee(){ if(tab2.offsetWidth-tab.scrollLeft<=0) tab.scrollLeft -=tab1.offsetWidth else{ tab.scrollLeft++; } } var MyMar=setInterval(Marquee,speed); tab.onmouseover=function() {clearInterval(MyMar)}; tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)}; --> </script> </body> </html> |
<<: MySQL extracts Json internal fields and dumps them as numbers
>>: Linux swap partition (detailed explanation)
This article example shares the specific code of ...
How to determine whether the current Linux system...
Table of contents Preface 1. First completely uni...
** Detailed graphic instructions for installing y...
Foreign Keys Query which tables the primary key o...
You can use the command: docker tag [image id] [n...
In HTML, <, >, &, etc. have special mean...
Preface Regarding HugePages and Oracle database o...
Slow query log related parameters MySQL slow quer...
Regarding the nginx panic problem, we first need ...
About let to avoid problems caused by closure Use...
Preface The master-slave replication relationship...
Table of contents 1. What is deconstruction? 2. A...
Translated from Docker official documentation, or...