本文介绍了Bootstrap 4 hidden-X-(down/up) 类不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Bootstrap v4.0 测试版,我已经检查了这个迁移文档

https://v4-alpha.getbootstrap.com/migration/#responsive-实用程序

但是没有办法让 hidden-X-up 或 hidden-X-down 起作用.这是我的代码示例:

 

<div class="row"><div class="col-md-3 hidden-md-down"><p class="title">加入我们</p><p class="subtitle">点击下面的按钮</p><p class="link"><a href="#" class="outstanding-link">下面的按钮</a></p>

它应该在中型设备(大于 720 像素)中以 3 列显示,但在低于中型设备中隐藏.

这是一个片段

https://jsfiddle.net/n7oo7dLk/

提前致谢.

解决方案

hidden-* 类已在 Bootstrap 4 Beta 中删除.现在 d-* 显示类可以用于响应式可见性...

例如,hidden-md-down 现在是:d-none d-lg-block

https://www.codeply.com/go/VsOfRxuPfo

另见这个答案Bootstrap 4 Beta 更改的完整列表.

I'm using Bootstrap v4.0 beta and I have checked this migration doc

https://v4-alpha.getbootstrap.com/migration/#responsive-utilities

but there's no way to make the hidden-X-up or hidden-X-down work. Here is an example of my code:

    <div class="container">
      <div class="row">
        <div class="col-md-3 hidden-md-down">
          <p class="title">Join us</p>
          <p class="subtitle">Just click on the button below</p>
          <p class="link"><a href="#" class="outstanding-link">the button below</a></p>
        </div>
      </div>
    </div>

it should be visible with 3 columns in a medium devices (greather than 720px) but hidden in less than a medium device.

Here is an snipet

https://jsfiddle.net/n7oo7dLk/

thanks in advance.

解决方案

The hidden-* classes have been removed in Bootstrap 4 Beta. Now the d-* display classes can be used for responsive visibility...

For example, hidden-md-down would now be: d-none d-lg-block

https://www.codeply.com/go/VsOfRxuPfo

Also see this answer and the full list of Bootstrap 4 beta changes.

这篇关于Bootstrap 4 hidden-X-(down/up) 类不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 12:01