| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <!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;
- position: relative;
- margin: 200px auto;
- }
-
- .pictures {
- width: 100%;
- height: 100%;
- display: none;
- }
- .choose {
- display: block;
- }
- #list {
- overflow: hidden;
- position: absolute;
- bottom: 5px;
- right: 10px;
- }
- #list li{
- width: 30px;
- height: 30px;
- color: #fff;
- text-align: center;
- line-height: 30px;
- border-radius: 50%;
- background: #00f;
- float: left;
- margin-left: 8px;
- }
- .active {
- color: #ff0 !important;
- background: #f00 !important;
- }
- #prev,#next {
- width: 60px;
- height: 40px;
- color: #fff;
- text-align: center;
- line-height: 40px;
- background: purple;
- display: none;
- }
- #prev {
- position: absolute;
- left: 0;
- top: 45%;
- }
- #next {
- position: absolute;
- right: 0;
- top: 45%;
- }
- </style>
- </head>
- <body>
- <div id="container">
- <div id="imgBox">
- <img class="pictures choose" src="./images/1.jpg" alt="">
- <img class="pictures" src="./images/2.jpg" alt="">
- <img class="pictures" src="./images/3.jpg" alt="">
- <img class="pictures" src="./images/4.jpg" alt="">
- <img class="pictures" src="./images/5.jpg" alt="">
- </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="./9.轮播.js"></script>
- </body>
- </html>
|