<hr> 元素在添加 <div 类= "row" >(引导)元素后消失



我正在使用bootstrap 4.3.1编写一个登录页
添加"行"div后,水平标尺消失了,我就是找不回来了
有趣的是,当我添加评论部分标记时,我可以再次看到水平线。

关于为什么会发生这种情况/如何在没有剖面标记的情况下使水平线再次可见,有什么建议吗?

<div class="container">
<div class="row">
<header class="text-center">
<h1 class="text-uppercase"><strong>The biggest startup event of the year</strong></h1>
</header>
<!-- <section> -->
<hr>
<button class="btn btn-primary btn-xl">Find out more</button>
<!-- </section> -->
</div>
</div>

您试图做的事情有点令人困惑,因为hr标签给出了宽度为100%的水平行,而该行占用了水平行

所以再想想这可能吗,试着关闭行的div,然后试着放上hr标签

<div class="container">
<div class="row">
<header class="text-center">
<h1 class="text-uppercase"><strong>The biggest startup event of theyear</strong></h1>
</header>
</div>
<!-- <section> -->
<hr>
<button class="btn btn-primary btn-xl">Find out more</button>
<!-- </section> -->
</div>

最新更新