gpt4 book ai didi

html - Bootstrap 行相互重叠

转载 作者:行者123 更新时间:2023-11-28 06:22:17 31 4
gpt4 key购买 nike

当我缩小浏览器窗口时,我网站的第一部分在移动设备上显示效果很差。

我正在使用 bootstrap,我一辈子都弄不明白为什么会这样。

本质上:我的 h1 标题没有按比例缩小,然后我的 h2 副标题覆盖在一个 greenpromobox div 之上,该 div 本身被下一行覆盖!

实例: http://185.123.96.102/~kidsdrum/moneynest.co.uk/ (调整浏览器窗口大小以查看糟糕的响应式布局)。

样式错误的部分的 HTML:

<div class="special">
<div class="jumbotron">
<div class="container text-center">
<div class="h1extrapadding hidden-xs hidden-sm"></div> <h1 class="boldme">Aged 20-30 & frustrated with money?</h1>
<div class="greenpromobox">
<div class="h2extrapadding hidden-xs hidden-sm"></div> <h2 class="boldme">Take our free <b class="jumpstarttext">Jumpstart Your Finances</b> class to<br /> quickly gain control over your finances</h2>


<!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup">
<form action="//moneynest.us11.list-manage.com/subscribe/post?u=9ccf2d2219536b32eaae3c3d1&amp;id=299de51b4e" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">


<img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/hand-drawn-arrow.png" id="handarrow" class="hidden-xs hidden-sm" alt="arrow"><input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Enter your email address" required autofocus>
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_9ccf2d2219536b32eaae3c3d1_299de51b4e" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="Start Class Now" name="subscribe" id="mc-embedded-subscribe" class="text-uppercase btn btn-primary btn-lg"></div>
</div>
</form>
</div>

<!--End mc_embed_signup-->

</div>
</div>

</div>
</div>
</div>

<div class="container-fluid bg-3 text-center">
<h3 class="h3big">What do you need help with?</h3><br>
<div class="row">
<div class="col-sm-4">
<img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/button-1.png" alt="button-1">
<div class="box-content">
<p class="alltextbig text-uppercase"><b>Living</b> paycheque to paycheque?</p>
<figure><img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/pound-coins.jpg" alt="saving money image" title="Saving money" class="tripleimage">
<figcaption>Lesson 1 - Learn how to stop the pay cheque to pay cheque cycle.</figcaption>

</figure>


<input type="submit" value="Start Class Now" name="subscribe" id="mc-embedded-subscribe" class="text-uppercase btn btn-primary btn-lg btn-middle" style="margin-top: 9%">

</div>
</div>
<div class="col-sm-4 columnBorder">

<img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/button-2.png" alt="button-1">
<div class="box-content column-border">
<p class="alltextbig text-uppercase"><b>Saving</b> to buy a home?</p>
<figure>
<img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/saving-to-buy-a-home.jpg" alt="Buying a house" title="Saving to buy a house" class="tripleimage"><figcaption>
Lesson 2 - Tips to rapidly save for your future home.
</figcaption>
</figure>

<input type="submit" value="Start Class Now" name="subscribe" id="mc-embedded-subscribe" class="text-uppercase btn btn-primary btn-lg btn-middle" style="margin-top: 9%">
</div>
</div>
<div class="col-sm-4">
<img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/button-3.png" alt="button-1">
<div class="box-content">
<p class="alltextbig text-uppercase"><b>Going</b> travelling?</p>
<figure>
<img src="http://185.123.96.102/~kidsdrum/moneynest.co.uk/img/going-travelling.jpg" alt="Travelling" title="Travelling" class="tripleimage">
<figcaption>Lesson 3 - How I personally travelled for 13 months with only £2,000 (yes I had a roof over my head every night!).
</figcaption>
</figure>

<input type="submit" value="Start Class Now" name="subscribe" id="mc-embedded-subscribe" class="text-uppercase btn btn-primary btn-lg btn-middle">

</div>
</div>
</div>
</div><br>

最佳答案

您需要在图像上放置 max-width: 100%;。这将停止重叠,但仍会在更大的屏幕尺寸上保持响应。

我还会将您的边框从 .column-border 移到 .columnBorder 上。这样空间会更好。

img { 
max-width: 100%;
}
.columnBorder {
border-left: 1px solid #ccc;
 border-right: 1px solid #ccc;
}

关于html - Bootstrap 行相互重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35512744/

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