本文介绍了Jumbotron隐藏H1标题的特殊类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我为Jumbotron添加了一个特殊类,以保持Jumbotron的高度为100%的用户浏览器窗口(无论什么大小)。
I’ve added a ‘special’ class to a Jumbotron to keep the Jumbotron's height 100% of the users browser window (no matter what size).
当我将这个类应用于jumbotron(greenpromobox)中的 div
时,位于我的标题顶部,从而隐藏 H1 $ c $
However when I apply this class to a div
within the jumbotron (greenpromobox) is sitting on top of my headline and thus hiding the H1
headline (which is in the Jumbotron) on mobile devices.
有关解决方案的任何想法?
Any ideas on a solution?
直播链接:
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&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>
CSS
.special,.special .jumbotron{
height:100%;
width: 100%;
}
推荐答案
已删除:
.special,.special .jumbotron{
height:100%;
}
已添加
@media only screen and (min-width: 768px) {
.special,.special .jumbotron
{height: 100%;
}
}
这阻止了Jumbotron在手机上的100%导致元素被隐藏。
This stopped the Jumbotron forcing 100% height on mobiles which was causing the elements to be hidden.
山姆
这篇关于Jumbotron隐藏H1标题的特殊类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!