1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <style>
- * {
- margin: 0;
- padding: 0;
- list-style: none;
- text-decoration: none;
- box-sizing: border-box;
- }
- #list {
- width: 500px;
- height: 400px;
- border: 1px solid #000;
- position: relative;
- margin: 200px auto;
- }
- #imgBox img{
- width: 500px;
- height: 400px;
- position: absolute;
-
- }
- .selected {
- display: none;
- }
- .choose {
- display: block;
- }
- .point {
- position: absolute;
- overflow: hidden;
- bottom: 10px;
- right: 10px;
- }
- .point li{
- width: 15px;
- height: 15px;
- border-radius: 50%;
- background: #f00;
- float: left;
- margin-left: 20px;
- }
- .point .active {
- background: #ff0;
- }
- #prev,#next {
- width: 40px;
- height: 30px;
- text-align: center;
- background:yellowgreen;
- position: absolute;
- top: 48%;
- display: none;
- }
- #prev {
- left: 0;
- }
- #next {
- right: -2px;
- }
- </style>
- </head>
- <body>
- <div id="list">
- <div id="imgBox">
- <img class="selected choose" src="./images/1.jpg" alt="">
- <img class="selected" src="./images/2.jpg" alt="">
- <img class="selected" src="./images/3.jpg" alt="">
- <img class="selected" src="./images/4.jpg" alt="">
- <img class="selected" src="./images/5.jpg" alt="">
- </div>
- <ul class="point">
- <li class="active"></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- </ul>
- <div id="prev"><</div>
- <div id="next">></div>
- </div>
- <script src="./4.轮播.js"></script>
- </body>
- </html>
|