实施twitter bootstrap轮播v2.3.2 [英] Implementing twitter bootstrap carousel v2.3.2

查看:134
本文介绍了实施twitter bootstrap轮播v2.3.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在执行bootstrap旋转木马时遇到问题。任何人都可以看看下面的html和js,并给我说明如何实现幻灯片。 .js没有被编辑,并且旋转木马被安装在主体英雄单元上。我是否实施了轮播API?如何在.js文件中定义我正在使用的传送带?谢谢。

 < div class =carousel> 

<! - 传送带物品 - >
< div class =carousel-inner>

<! - 主营销信息或号召行动的主要英雄单位 - >
< div class =hero-unit>
< h1> Hello,world!< / h1>
< p>这是一个简单的营销或信息网站的模板。它包括一个叫做英雄单元的大标注和三个支持内容。用它作为创建更独特的东西的起点。< / p>
< p>< a class =btn btn-primary btn-large>了解详情& raquo;< / a>< / p>
< / div>

< / div>

<! - Carousel nav - >

< a class =carousel-control lefthref =#myCarouseldata-slide =prev>& lsaquo;< / a>
< a class =carousel-control righthref =#myCarouseldata-slide =next>& rsaquo;< / a>

< / div>


解决方案

Bootstrap Carousel的文档可以在这里找到: http://twitter.github.com/bootstrap/javascript.html#carousel p>

我想你需要添加这样的内容才能运行:

 < script type =text / javascript> 
$(function(){
$('。carousel')。carousel();
});
< / script>


I am having trouble implementing the bootstrap carousel. Can anyone look at the following html and js and give me instructions on how to implement the slide. The .js has not been edited and the carousel is installed on the body hero unit. Do I implement the carousel api? How do I define the carousel I am using within the .js file? Thanks.

<div class="carousel">

  <!-- Carousel items -->
  <div class="carousel-inner">

      <!-- Main hero unit for a primary marketing message or call to action -->
      <div class="hero-unit">
        <h1>Hello, world!</h1>
        <p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
        <p><a class="btn btn-primary btn-large">Learn more &raquo;</a></p>
      </div>  

  </div>      

 <!-- Carousel nav -->

  <a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
  <a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>

  </div>

解决方案

The documentation for Bootstrap Carousel is available here: http://twitter.github.com/bootstrap/javascript.html#carousel

I guess you would need to add something like this to get it running:

<script type="text/javascript">
$(function(){
   $('.carousel').carousel();
});
</script>

这篇关于实施twitter bootstrap轮播v2.3.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆