banner.html 2.6 KB
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>轮播图</title>
    <!--<meta name="viewport" content="width=device-width, initial-scale=1" />-->
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_1043230_jxegrvbhrr.css">
    <link rel="stylesheet" type="text/css" href="css/banner.css">
    <link rel="stylesheet" type="text/css" href="css/swiper-3.4.2.min.css">

    <script src="js/base.js"></script>
    <style>
        .banner{
            width: 7.5rem;
            height: 100%;
            position: relative;
        }
        .banner_pic{
            width: 7.5rem;
            height:100%;
            display: flex;
        }
        .banner_pic img{
            width: 100%;
            height: 100%
        }
        .swiper-pagination-bullet{
            background-color: #7ECEF4;
        }
        .swiper-pagination-bullet-active{
            background-color: #ffffff;
        }
        /*按钮之间的间隔*/
        .swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{
            margin: 0 0.6rem;
        }
    </style>
</head>
<body>
<div class="banner">

    <!-- Swiper -->
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide banner_pic">
                <img src="images/banner.png">
                <div class="btn_button">点击进入 天津汽车零部件展网站>></div>
            </div>
            <div class="swiper-slide banner_pic">
                <img src="images/banner.png">
                <div class="btn_button">点击进入 工业装配及自动化展网站>></div>
            </div>
            <div class="swiper-slide banner_pic">
                <img src="images/banner.png">
                <div class="btn_button">点击进入 天津汽车零部件展网站>></div>
            </div>

        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination"></div>
    </div>

</div>
</body>
<script src="js/jquery.min.js"></script>
<script src="js/swiper-3.4.2.jquery.min.js"></script>
<script>


    $('.btn_button').click(function () {
        console.log(111)
        window.location.href = "index.html";
    })
    var swiper = new Swiper('.swiper-container',{
        // autoplay: {
        //     delay: 3000,
        //     disableOnInteraction: false,
        // },
        loop: true, // 循环模式选项

        pagination: {
            el: '.swiper-pagination',
        },
    });
</script>
</html>