【发布时间】:2017-11-15 10:32:39
【问题描述】:
Soo...如果有人有几分钟的空闲时间,可以看看我的代码并在这里帮助我...我有一个我无法解决的问题,并且已经困扰了好几个小时...
所以我正在使用 Bootstrap 为当地的市际足球协会制作一个页面,我正在尝试实现 这个: 覆盖背景图像的轮播,不要介意蓝色和黄色的东西.. .
这是我的代码: HTML:
<!--Background image-->
<div class="bg">
<img src="img/football-field.jpg" class="img-responsive" alt="ozadje">
</div>
<!--Main content of page-->
<section id="main-content">
<div class="container">
<div class="col-md-2 col-sm-2 navigation">
content content
content content
content content
content content
content content
content content
</div>
<!--Beginning of carousel-->
<div class="col-md-10 col-md-10 galery">
<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>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="img/example.jpg" alt="desc">
</div>
<div class="item">
<img src="img/example.jpg" alt="desc">
</div>
<div class="item">
<img src="img/example.jpg" alt="desc">
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</section>
还有我的CSS:
.bg{
height: 420px;
z-index: -999;
}
#main-content{
z-index: 100;
background-color: white;
}
我真的很感激一些帮助:)
PS我希望你能理解我的意思并努力完成...英语不是我的母语,所以可能会有一些糟糕的单词选择、糟糕的解释和很多错别字: )
【问题讨论】:
-
您能否提供带有实际内容/图像的实时网址以进行更简单的调试?
标签: html css twitter-bootstrap background carousel