【发布时间】:2017-04-11 10:04:48
【问题描述】:
在我更改浏览器窗口大小之前,一切看起来都很好:轮播标题上升并与右侧控件重叠。我希望标题留在原处,只是更改文本大小。
还有另外一个问题:在改变浏览器窗口大小时轮播控件变大了。
.carousel-caption{
position: absolute;
left: 200px;
width: 500px;
margin-left: 30%;
margin-bottom: 8%;
padding-right: 40px;
max-height: 100%;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.p1 {
margin: auto;
font-size: 22px;
font-family: ClearSans-Light;
color: white;
text-align: left;
text-shadow: 1px 1px 2px black, 0 0 1em transparent;
}
.p2 {
font-size: 22px;
color: white;
text-align: right;
}
.position {
font-family: ClearSans-Bold;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<header id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="item active">
<div class="fill" style="background-image:url('http://placehold.it/1900x1080&text=Slide One');"></div>
<div class="carousel-caption my-carousel-caption">
<p class="p1">
Snail is a common name that is applied most often to land snails, terrestrial pulmonate gastropod molluscs. However, the common name "snail" is also applied to ..
</p>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="carousel-arrow glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="carousel-arrow glyphicon glyphicon-chevron-right"></span>
</a>
</header>
【问题讨论】:
-
我忘了添加这个:.carousel-control.left, .carousel-control.right { background-image: none;背景:无!重要;过滤器:progid:无!重要;大纲:无; }
-
添加了更改窗口大小时外观的快捷方式
标签: html css twitter-bootstrap twitter-bootstrap-3 carousel