gpt4 book ai didi

html - 由于 bootstrap 轮播指示器,文本上下移动

转载 作者:行者123 更新时间:2023-11-28 07:32:02 27 4
gpt4 key购买 nike

我对文本轮播下的内容有疑问,因为滑动轮播时轮播下的所有内容都会上下移动,我将指示器定位在文本下,在这种情况下最好的解决方案是什么? http://codepen.io/anon/pen/MwGLJd

HTML

<div class="about mainContainer">
<div class="row">
<div class="col-sm-offset-2 col-sm-8">
<h2 class="fontraleway">WHO WE ARE?</h2>
<div id="locations" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#locations" data-slide-to="0" class="active"></li>
<li data-target="#locations" data-slide-to="1"></li>
<li data-target="#locations" data-slide-to="2"></li>
<li data-target="#locations" data-slide-to="3"></li>
</ol>

<div class="carousel-inner">
<div class="item active">
<center>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque iaculis rhoncus finibus. Donec tempor mi massa, a sollicitudin diam semper ut. Nam pulvinar nisi nisi, vitae rhoncus purus rhoncus id. Nam ac augue sed erat consequat efficitur. Integer aliquet elit et velit porttitor, eget blandit arcu venenatis. Donec fringilla urna purus, sit amet malesuada est dignissim mattis. Donec cursus, quam vel luctus blandit, dui sapien interdum sapien, vitae ultrices arcu leo et augue. Vestibulum fermentum nulla augue, in ultrices risus rutrum a. Suspendisse sed porttitor tellus. Ut vitae vulputate sapien, a facilisis quam.
</center>
</div>

<div class="item">
<center>
Ut eu iaculis arcu. Cras pretium lacus eget mi mattis sollicitudin. Vivamus posuere vehicula mi eu condimentum. Donec eros dolor, sagittis quis arcu non, pulvinar euismod turpis. Suspendisse accumsan sodales massa, eget pretium nunc rhoncus a. Fusce a magna sit amet odio ullamcorper dapibus nec quis nulla. Curabitur enim risus, convallis at felis non, consectetur efficitur risus. Class aptent taciti eptos himenaeos. Nulla facilisi. Aliquam posuere feugiat risus, non mollis nunc iaculis nec. Praesent non tellus rhoncus
</center>
</div>

<div class="item">
<center>
Sed eget luctus leo, eu sagittis felis. Vestibulum et tellus sed neque gravida pretium vel pellentesque tellus. Nullam in dolor magna. Donec in mauris eget nisl volutpat ornare a ut dolor. Vestibulum sit amet felis et purus sagittis interdum. Quisque quis nisi neque. In viverra lobortis ex in auctor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Ut at nulla augue. Duis et congue erat. Maecenas odio justo, finibus at nulla at, luctus elementum eros. Quisque eget nisl felis. Phasellus tempus imperdiet dui condimentum bibendum. Sed a turpis quis diam ullamcorper interdum in at lectus
</center>
</div>

<div class="item">
<center>
Ut eu iaculis arcu. Cras pretium lacus eget mi mattis sollicitudin. Vivamus posuere vehicula mi eu condimentum. Donec eros dolor, sagittis quis arcu non, pulvinar euismod turpis. Suspendisse accumsan sodales massa, eget pretium nunc rhoncus a. Fusce a magna sit amet odio ullamcorper dapibus nec quis nulla. Curabitur enim risus, convallis at felis non, consectetur efficitur risus. Class aptent taciti eptos himenaeos. Nulla facilisi. Aliquam posuere feugiat risus, non mollis nunc iaculis nec. Praesent non tellus rhoncus
</center>
</div>
</div>
</div>
</div>
</div><!--Closed div row-->
</div><!--Closed div about-->

<div style="clear:both"></div>

<div class="content2">
<p>lor sit amet, consectetur adipiscing elit. Pellentesque iaculis rhoncus finibus. Donec tempor mi massa, a sollicitudin diam semper ut. Nam pulvinar nisi nisi, vitae rhoncus purus rhoncus id. Nam ac augue sed erat consequat efficitur. Integer aliquet elit et velit porttitor, eget blandit arcu venenatis. Donec fringilla urna purus, sit amet malesuada est dignissim mattis. Donec cursus, quam vel luctus blandit, dui sapien interdum sapien, vitae ultrices arcu leo et augue. Vestibulum fer</p>
</div>

CSS

.services h2{
margin-top: 97px;
}
.carousel-indicators li{
background-color: transparent;
border:2px solid #dbdbdb;
overflow:hidden;
}
.carousel-indicators .active{
background-color: #3eb8df;
border:2px solid #3eb8df;
}
.carousel-indicators{
bottom:-60px !important;
}
.carousel-indicators li{
width:15px !important;
height:15px !important;
}

.content2{
margin-top:100px;
color:blue
}

最佳答案

如果 carousel 的内容是静态的,则使用类“carousel-inner”的高度如果内容是动态的,那么您必须找到元素的 mx 高度,然后分配。

关于html - 由于 bootstrap 轮播指示器,文本上下移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31447371/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com