Home > Web Front-end > JS Tutorial > What carousel templates can be used in bootstrap?

What carousel templates can be used in bootstrap?

PHPz
Release: 2018-10-16 16:14:20
Original
1362 people have browsed it

This time I will bring you which carousel templates can be used in bootstrap, and what are the precautions for using bootstrap carousel templates. The following is a practical case, let's take a look.

The example in this article shares the specific code for bootstrap carousel template display for your reference. The specific content is as follows

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8" />
 <title>Document</title>
 <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="external nofollow" >
 <style type="text/css">
  .carousel {
   height: 500px;
  }
  .carousel .item {
   height: 500px;
   background-color: #000;
  }
  .carousel .item img {
   width: 100%;
  }
  .carousel-caption {
   z-index: 10;
  }
 </style>
</head>
 <body>
  <!-- 轮播 -->
 <p id="ad-carousel" class="carousel slide" data-ride="carousel">
  <ol class="carousel-indicators">
   <li data-slide-to="0" class="active"></li>
   <li data-slide-to="1"></li>
   <li data-slide-to="2"></li>
  </ol>
  <p class="carousel-inner">
   <p class="item active">
    <img src="http://img.glzy8.com/upfiles/www/ppt/jpg/24675.jpg" alt="1 slide">
    <p class="container">
     <p class="carousel-caption">
      文本区域
     </p>
    </p>
   </p>
   <p class="item">
    <img src="2F1-130516091446402.jpg" alt="2 slide">
    <p class="container">
     <p class="carousel-caption">
      文本区域
     </p>
    </p>
   </p>
   <p class="item">
    <img src="-110910214P238.jpg" alt="3 slide">
    <p class="container">
     <p class="carousel-caption">
      文本区域
     </p>
    </p>
   </p>
  </p>
  <a class="left carousel-control" href="#ad-carousel" data-slide="prev"><span
    class="glyphicon glyphicon-chevron-left"></span></a>
  <a class="right carousel-control" href="#ad-carousel" data-slide="next"><span
    class="glyphicon glyphicon-chevron-right"></span></a>
 </p>
 <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
 <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" ></script>
</body>
</html>
Copy after login

I believe you have mastered the method after reading the case in this article. Please come for more exciting information. Pay attention to other related articles on php Chinese website!

Recommended reading: Bootstrap Tutorial

The above is the detailed content of What carousel templates can be used in bootstrap?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template