bootstrap的carousel图片轮播怎么修改显示图片的尺寸
这个多出来的空白怎么能修改啊附上代码:<divid="carousel-example-generic"class="carouselslide"data-ride="c...
这个多出来的空白怎么能修改啊
附上代码:
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<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>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="a.jpg" alt="...">
<div class="carousel-caption">
<h4>hello
</div>
</div>
<div class="item">
<img src="b.jpg" alt="...">
<div class="carousel-caption">
<h4>hi
</div>
</div>
<div class="item">
<img src="a.jpg" alt="...">
<div class="carousel-caption">
<h4>haa
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div> 展开
附上代码:
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<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>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="a.jpg" alt="...">
<div class="carousel-caption">
<h4>hello
</div>
</div>
<div class="item">
<img src="b.jpg" alt="...">
<div class="carousel-caption">
<h4>hi
</div>
</div>
<div class="item">
<img src="a.jpg" alt="...">
<div class="carousel-caption">
<h4>haa
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div> 展开
4个回答
展开全部
你试试吧image标签的宽度设置为100%
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
如果已经是最大的尺寸的话,那么就是屏幕分辨率的问题,
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<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>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active" style="background:url(a.jpg); background-size:cover;">
<img src="a.jpg" alt="...">
<div class="carousel-caption">
<h4>hello
</div>
</div>
<div class="item" style="background:url(b.jpg); background-size:cover;">
<img src="b.jpg" alt="...">
<div class="carousel-caption">
<h4>hi
</div>
</div>
<div class="item" style="background:url(a.jpg); background-size:cover;">
<img src="a.jpg" alt="...">
<div class="carousel-caption">
<h4>haa
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
<!-- Indicators -->
<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>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active" style="background:url(a.jpg); background-size:cover;">
<img src="a.jpg" alt="...">
<div class="carousel-caption">
<h4>hello
</div>
</div>
<div class="item" style="background:url(b.jpg); background-size:cover;">
<img src="b.jpg" alt="...">
<div class="carousel-caption">
<h4>hi
</div>
</div>
<div class="item" style="background:url(a.jpg); background-size:cover;">
<img src="a.jpg" alt="...">
<div class="carousel-caption">
<h4>haa
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
直接改Img大小就好了,不行的话改Img外层item,应该可以
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询