html - Bootstrap 3 : Hide elements on devices smaller than tablets without using 2 classes bootstrap

标签 html css twitter-bootstrap

是否可以在小于平板电脑的设备上隐藏元素(col-sm-* & col-xs-*)而不使用 2 个 Bootstrap 类 visible-md visible-lg 在具有 bootstrap 3 预定义类的元素上:

<div class="col-sm-8 visible-md visible-lg"> ..</div>

谢谢

最佳答案

根据 documentation可见(和隐藏)类仅针对该媒体查询大小显示,如果您希望扩展类以允许您使用单个类执行此操作,但是这需要您对媒体查询和 css3 有基本的了解( sass 或更少,如果你使用预处理器)。

正如@Vijay Maheriya 在评论中所说,您可以使用 hidden-xs 类将其隐藏在 col-sm-* 查询范围之下。

关于html - Bootstrap 3 : Hide elements on devices smaller than tablets without using 2 classes bootstrap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38720460/

相关文章:

jquery - Twitter Bootstrap Carousel 滑动到特定索引但穿过中间索引?

javascript - 如果我更改端点,中间件将不起作用

php - array_push() 抛出错误

javascript - CSS 过渡回调

twitter-bootstrap - bootstrap-table.js 中的下拉按钮

javascript - 使用 jQuery UI 问题使 Bootstrap 模式可调整大小

html - 当 flex-wrap 使用纯 CSS 包裹元素时移除 margin-right

html - AirMail - 用作预览的非断行技巧

css - 仅当内容拉伸(stretch)时才展开 CSS Div

html - 用背景颜色填充整个旋转的 <th>