bootstrap轮播时间在哪里设置


本文摘自PHP中文网,作者尚,侵删。


BootStrap轮播图官方代码:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

<!--data-ride设置图片切换方式为滑动 -->

<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">

  <!-- 设置轮播图的数量和顺序-->

  <!--data-target的值应与上面的id值对应 -->

  <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>

 

  <!-- 要展示的图片信息 -->

  <div class="carousel-inner" role="listbox">

    <div class="item active">

      <img src="..." alt="...">

      <div class="carousel-caption">

        ...

      </div>

    </div>

    <div class="item">

      <img src="..." alt="...">

      <div class="carousel-caption">

        ...

      </div>

    </div>

    ...

  </div>

 

  <!-- 控制图标 -->

  <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>

实现轮播图时间间隔改变的两种方式:

阅读剩余部分

相关阅读 >>

jquery和bootstrap的区别是什么?

bootstrap如何使用路径分页标签

浅谈css grid比bootstrap更适合创建布局的原因

用npm下载bootstrap后怎么引入

bootstrap和vue的区别

bootstrap如何更改导航栏颜色

bootstrap 模态框用法

bootstrap与html5的区别是什么

bootstrap整体架构包含哪些模块

为什么使用bootstrap

更多相关阅读请进入《bootstrap》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...