- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <title>美食加倍,享受加倍</title>
- <link rel="stylesheet" href="bootstrap\css\bootstrap.css">
- <link rel="stylesheet" type="text/css" href="css\swiper-3.4.2.min.css">
- <script type="text/javascript" src="js\swiper-3.4.2.min.js"></script>
- <!--<style type="text/css" media="screen">
- </style>-->
- <style type="text/css">
- .d4 img{
- width: 100%;
- }
- .swiper-button-prev{
- position: absolute;
- z-index: 9;
- left: 18%;
- width: 50px;
- height: 50px;
- cursor: pointer;
- opacity: 80;
- background-color: #D0C4AF;
- border-radius: 500px;
- text-align: center;
- line-height: 50px;
- background-image: none;
- font-size: 25px;
- }
- .swiper-button-next{
- position: absolute;
- z-index: 9;
- right: 18%;
- width: 50px;
- height: 50px;
- cursor: pointer;
- opacity: 80;
- background-color: #D0C4AF;
- border-radius: 500px;
- text-align: center;
- line-height: 50px;
- background-image: none;
- font-size: 25px;
- }
- .d4 .glyphicon{
- line-height: 50px;
- color:#fff;
- }
- </style>
- </head>
- <body>
- <div class="d4">
- <div class="swiper-container">
- <div class="swiper-wrapper">
- <div class="swiper-slide">
- <img src="imgs\2.png" alt="">
- </div>
- <div class="swiper-slide">
- <img src="imgs\3.png" alt="">
- </div>
- <div class="swiper-slide">
- <img src="imgs\4.png" alt="">
- </div>
- </div>
- <!-- 如果需要导航按钮 -->
- <div class="swiper-button-prev">
- <span class="glyphicon glyphicon-menu-left"></span>
- </div>
- <div class="swiper-button-next">
- <span class="glyphicon glyphicon-menu-right"></span>
- </div>
- </div>
- </div>
- <script>
- var mySwiper = new Swiper ('.swiper-container', {
- direction: 'horizontal',
- loop: true,
- autoplay : 3000,
- // 如果需要前进后退按钮
- nextButton: '.swiper-button-next',
- prevButton: '.swiper-button-prev'
- });
- </script>
- </body>
- </html>