0

在为 Bootstrap 的轮播创建简单模板时,缺少“>”符号。您可以在文档中轻松发现它们。我必须在某个地方提供它们吗?如果是,如何以及在哪里?这是代码:

<!DOCTYPE html>
<html lang='de'>
  <head>
    <meta charset='utf-8' />
    <title>XX</title>
    <meta content='' name='keywords' />
    <meta content='' name='description'>
      <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
      <!--[if lt IE 9]>
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
      <![endif]-->
    </meta>
    <link href='css/bootstrap.min.css' rel='stylesheet' />
    <!-- Le fav and touch icons -->
    <link href='img/favicon.ico' rel='shortcut icon' />
    <link href='css/bootstrap.min.css' media='screen' rel='stylesheet' />
  </head>
  <body>
    <div class='container'>
      <div class='carousel slide' id='myCarousel'>
        <div class='carousel-inner'>
          <div class='active item'>
            <a href='#'>
              <img src='img/slide-01.jpg' />
            </a>
            <div class='carousel-caption'>
              <p class='lead'>
                XX
              </p>
              <a class='btn btn-large btn-primary' href='#'>
                XX
              </a>
            </div>
          </div>
          <div class='item'>
            <a href='#'>
              <img src='img/slide-02.jpg' />
            </a>
            <div class='carousel-caption'>
              <p class='lead'>
                XX
              </p>
              <a class='btn btn-large btn-primary' href='#'>
                XX
              </a>
            </div>
          </div>
        </div>
        <a class='carousel-control left' data-slide='prev' href='#myCarousel'></a>
        <a class='carousel-control right' data-slide='next' href='#myCarousel'></a>
      </div>
    </div>
  </body>
  <script src='http://code.jquery.com/jquery-latest.js'></script>
  <script src='js/bootstrap.min.js'></script>
  <script type='text/javascript'>
    //<![CDATA[
      !function ($) {
        $(function(){
          var $window = $(window)
          $('#myCarousel').carousel('')
        })
      }(window.jQuery)
    //]]>
  </script>
</html>
4

1 回答 1

2

这是一个可以帮助您入门的工作轮播:http: //jsfiddle.net/panchroma/VuSqQ/

请注意,滑动控件正在指定箭头的字符

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

祝你好运!

于 2013-01-24T13:41:36.563 回答