Boostrao:轮播图

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>黑马旅游网</title>
    <!--引入本地的bootstrap——css-->
    <link href="../js/bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet">
    <script src="../js/jquery/jquery-3.3.1.min.js"></script>
    <script src="../js/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
</head>
<body>
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
        <div class="item active">
            <img src="../img/banner_1.jpg" alt="...">
        </div>
        <div class="item">
            <img src="../img/banner_2.jpg" alt="...">
        </div>
        <div class="item">
            <img src="../img/banner_3.jpg" alt="...">
        </div>
    </div>
    <!-- Controls -->
    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
    </a>
</div>
</body>
</html>
View Code

 

展示效果

 

posted @ 2021-02-07 21:13  薄眠抛却陈年事。  阅读(50)  评论(0编辑  收藏  举报