gpt4 book ai didi

html - 调整浏览器大小时对齐不正确 - 响应页面

转载 作者:太空宇宙 更新时间:2023-11-04 03:13:39 24 4
gpt4 key购买 nike

我在这里使用 Bootstrap3 进行响应式页面设计。我在横幅内容中添加了一个框,其中包含一些文本,如下所示:

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<section id="slider">

<ul class="rslides" id="modest-slider">

<li class="slider-wrapper">

<div class="slider-img-container">
<img src="http://placehold.it/350x150&text=slider1" alt="slider1" />
</div>

<div class="slider-caption container">
<div class="col-md-7" style="border-left-width: 4px; top: auto; bottom: 126px; width: 600px; background: rgba(255, 255, 255, 0.6); height:130px;">
<h1>Exclusively New Concept!</h1>
<p class="slider-description2">
Lorem ipsum sample Lorem ipsum sample Lorem ipsum sample Lorem ipsum sample Lorem ipsum sample...
</p>
</div>
</div>
<!-- /.slider-caption -->

</li>
<!-- /.slider-wrapper -->
</ui>
</section>

它在全屏模式下运行良好。当我调整浏览器大小时,对齐方式无法正常工作。内容框与页面不符。任何帮助将不胜感激!!

最佳答案

尝试稍作修改的解决方案

演示 http://www.bootply.com/p6wIuR17QB

/* CSS used here will be applied after bootstrap.css */

#modest-slider {
position: relative;
}
.slider-caption {
position: absolute;
bottom: 0;
margin-bottom: 20px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"/>
<section id="slider">

<ul class="rslides list-unstyled" id="modest-slider" stye="position:relative;">

<li class="slider-wrapper">

<div class="slider-img-container">
<img src="http://placehold.it/600x300&amp;text=slider1" alt="slider1" class="img-responsive">
</div>

<div class="slider-caption container">
<div class="col-xs-10 col-sm-8" style="background: rgba(255, 255, 255, 0.6);">
<h1>Exclusively New Concept!</h1>
<p class="slider-description2">
Lorem ipsum sample Lorem ipsum sample Lorem ipsum sample Lorem ipsum sample Lorem ipsum sample...
</p>
</div>
</div>
<!-- /.slider-caption -->

</li>
<!-- /.slider-wrapper -->

</ul>
</section>

关于html - 调整浏览器大小时对齐不正确 - 响应页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29099981/

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