Google App Engine - 无法显示图像的Bootstrap轮播

时间:2015-03-18 04:44:20

标签: twitter-bootstrap google-app-engine

我创建了一个Google App Engine Web项目,更新了默认的index.html以包含bootstrap carousel,当我在本地启动应用程序时,它会显示图片..当我将其部署到app引擎时,它不会显示图像。

appengine_web.xml

<static-files>
    <include path="images/pic.JPG" />  
    <include path="images/**" />
  </static-files>

<!DOCTYPE html>
<html>
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.js"></script>
  <style>
  .carousel-inner > .item > img,
  .carousel-inner > .item > a > img {
      width: 70%;
      margin: auto;
  }
  </style>
</head>

<body>
  <div class="jumbotron">
    <h1>My First Bootstrap Page</h1>
    <p>Resize this responsive page to see the effect!</p> 
    <img src="/images/pic.jpg"/>
  </div>

<div class="container">

<div id="myCarousel" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
    <li data-target="#myCarousel" data-slide-to="1"></li>
    <li data-target="#myCarousel" data-slide-to="2"></li>
    <li data-target="#myCarousel" data-slide-to="3"></li>
  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner" role="listbox">
    <div class="item active">
      <img src="/images/pic.jpg" alt="Photo 1"/>
    </div>

    <div class="item">
      <img src="/images/pic2.jpg" alt="Photo 1"/>
    </div>

    <div class="item">
      <img src="/images/pic3.jpg" alt="Photo 1"/>
    </div>

    <div class="item">
      <img src="/images/pic4.jpg" alt="Photo 1"/>
    </div>
  </div>

  <!-- Left and right controls -->
  <a class="left carousel-control" href="#myCarousel" 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="#myCarousel" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

<div class="row">
  <div class="col-md-4">
    <h2>London</h2>
    <p>London is the capital city of England.</p>
    <p>It is the most populous city in the United Kingdom,
    with a metropolitan area of over 13 million inhabitants.</p>
  </div>
  <div class="col-md-4">
    <h2>Paris</h2>
    <p>Paris is the capital and most populous city of France.</p>
  </div>
  <div class="col-md-4">
    <h2>Tokyo</h2>
    <p>Tokyo is the capital of Japan, the center of the Greater Tokyo Area,
    and the most populous metropolitan area in the world.</p>
  </div>
</div>

</div>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

我有相同的图片问题没有显示

我必须使用photo:true

更新colorbox插件
$(document).ready(function(){
    $(".group1").colorbox({rel:'group1',photo: true});
});

希望它可能会有所帮助。