The JD carousel was implemented using pure HTML and CSS, without adding dynamic effects, and mainly using positioning knowledge.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>LunBo</title> <style> *{ padding: 0; margin: 0; } li{ list-style: none; } .lunbo{ margin: 40px auto; height: 470px; width: 590px; position: relative; } .left,.right{ position: absolute; top: 50%; margin-top: -18px; width: 24px; height: 36px; } .left{ left: 0; } .right{ right: 0; } .lunbo ul{ height: 18px; width: 151px; background: rgba(255,255,255,.3); position: absolute; bottom: 10px; left: 50%; margin-left: -76px; border-radius: 10px; } .lunbo li{ height: 14px; width: 14px; border-radius: 50%; background-color: #fff; float: left; margin: 2px; } .lunbo .current{ background-color: #f40; } </style> </head> <body> <div class="lunbo"> <img src="images/lunbo.jpg" alt=""> <div class="left"><img src="images/left.png" alt=""></div> <!-- You can also use a link and then use background --> <div class="right"><img src="images/right.png" alt=""></div> <ul> <li class="current"></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> </div> </body> </html> The following effects were achieved Summarize The above is the pure HTML and CSS to achieve the JD carousel effect introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! |
<<: The unreasonable MaxIdleConns of MySQL will cause short connections
>>: Five practical tips for web form design
There is no mysql by default in the yum source of...
As the company's influence grows and its prod...
As a front-end Web engineer, you must have encoun...
Table of contents chmod Example Special attention...
Preface Although the holiday is over, it shows up...
Detailed explanation of the role of static variab...
inherit 1. What is inheritance Inheritance: First...
There are many attributes in CSS. Some attributes...
This article example shares the specific code of ...
1. This is a bit complicated to understand, I hop...
Margin of parallel boxes (overlap of double margi...
Table of contents 1. Date 2. RegExp 3. Original p...
1. The difference between Http and Https HTTP: It...
Preface Nodejs is a server-side language. During ...
Cause of failure Today, when I was writing a caro...