Bootstrap4 上的隐藏 sm-down 不起作用



我试图让我的图像在 m+ 设备上位于我的文本上方,在 sm- 设备上位于文本下方。我正在使用 Bootstrap4,据我所知,遵循了 Bootstrap 提供的所有教程 - 但它并没有隐藏我的图像。 提前感谢您的帮助。

这是我的代码:

<div class="container">
<div class="row">
<div class="hidden-sm-down">
<div class="col-md-6">
<img class="img-fluid" src="img/finding.svg" onerror="this.src='img/finding.png';this.onerror=null;" alt="">
</div>
</div>
<div class="col-md-6 col-sm-12">
<h5 class="heading">Get SMS notifications for new dates</h5>
<p class="sell">
This is where the text would go.
</p>
</div>
<div class="hidden-md-up">
<div class="col-md-6">
<img class="img-fluid" src="img/finding.svg" onerror="this.src='img/finding.png';this.onerror=null;" alt="">
</div>
</div>
</div>
</div>

这是因为类hidden-sm-downhidden-sm-up在Bootstrap 4 Beta 3中不再存在。

而不是hidden-sm-up使用d-sm-none等。

完整列表在这里:

https://getbootstrap.com/docs/4.0/utilities/display/#hiding-elements

最新更新