123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <!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;
- }
- #container {
- width: 590px;
- height: 470px;
- margin: 100px auto;
- position: relative;
- }
- #imgBox {
- /* position: absolute;
- top: 0; */
- }
- .selected {
- display: none;
- }
- .choose {
- display: block;
- }
- #list {
- overflow: hidden;
- position: absolute;
- right: 10px;
- bottom: 10px;
- }
- #list li {
- float: left;
- width: 20px;
- height: 20px;
- background: purple;
- color: #fff;
- font-size: 14px;
- text-align: center;
- line-height: 20px;
- border-radius: 50%;
- margin-right: 10px;
- }
- #list .active {
- background: #f00;
- color: #ff0;
- }
- #prev,#next {
- width: 50px;
- height: 50px;
- background: rgb(0, 42, 255);
- color: #66e21f;
- font-size: 30px;
- text-align: center;
- line-height: 50px;
- position: absolute;
- top: 50%;
- margin-top: -25px;
- display: none;
- }
- #prev {
- left: 0;
- }
- #next {
- right: 0;
- }
- </style>
- </head>
- <body>
- <div id="container">
- <div id="imgBox">
- <img src="../image/1.jpg" alt="" class="selected choose">
- <img src="../image/2.jpg" alt="" class="selected">
- <img src="../image/3.jpg" alt="" class="selected">
- <img src="../image/4.jpg" alt="" class="selected">
- <img src="../image/5.jpg" alt="" class="selected">
- </div>
- <ul id="list">
- <li class="active">1</li>
- <li>2</li>
- <li>3</li>
- <li>4</li>
- <li>5</li>
- </ul>
- <div id="prev">
- <span><</span>
- </div>
- <div id="next">
- <span>></span>
- </div>
- </div>
- <script src="../js/5.轮播图.js"></script>
- </body>
- </html>
|