123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <!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: 150px auto;
- border: 2px solid #000;
- position: relative;
- }
- .selected {
- display: none;
- }
- .choose {
- display: block;
- }
- #list {
- overflow: hidden;
- position: absolute;
- right: 10px;
- bottom: 10px;
- }
- #list li {
- float: left;
- width: 30px;
- height: 30px;
- text-align: center;
- line-height: 30px;
- font-size: 14px;
- border-radius: 50%;
- color: #fff;
- background-color: blue;
- margin-left: 7px;
- }
- #list .active {
- color: yellow;
- background: red;
- }
- #prev,#next {
- width: 60px;
- height: 40px;
- text-align: center;
- line-height: 40px;
- color: #fff;
- background: purple;
- display: none;
- }
- #prev{
- position: absolute;
- left: 0;
- top:50%;
- }
- #next{
- position: absolute;
- right: 0;
- top:50%;
- }
- </style>
- </head>
- <body>
- <div id="container">
- <div id="imgBox">
- <img src="./images/1.jpg" class="selected choose" alt="">
- <img src="./images/2.jpg" class="selected" alt="">
- <img src="./images/3.jpg" class="selected" alt="">
- <img src="./images/4.jpg" class="selected" alt="">
- <img src="./images/5.jpg" class="selected" 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="./6.轮播.js"></script>
- </body>
- </html>
|