Twitter Bootstrap 响应式 - 仅在桌面上显示表格列 [英] Twitter Bootstrap Responsive - Show Table Column only on Desktop

查看:18
本文介绍了Twitter Bootstrap 响应式 - 仅在桌面上显示表格列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 DataTables.net + Twitter Bootstrap 和响应式布局,我正在尝试使用visible-desktop"类隐藏表格的某些列,该类仅以大尺寸显示列,但似乎不起作用,隐藏得很好,但是如果我调整窗口大小以获得桌面宽度,隐藏的列开始显示堆叠,似乎是 CSS 显示类问题,因为从父级继承了显示类型:

I'm using DataTables.net + Twitter Bootstrap and the responsive layout, what I'm trying is to hide some columns of the table using the class "visible-desktop" thats shows the columns only in big sizes but It seems not to work, hides well but if I resize the windows to get a desktop width the columns hidden start showing stacked, seems a CSS display class problem, because inherits the type of display from the parent:

.visible-desktop {
    display: inherit!important;
}

如果我操纵它

.visible-desktop {
    display: table-cell!important;
}

效果很好...有解决方法吗?或者我必须编写自己的类来隐藏表列?

works well... Is there a workaround for this? Or I have to write my own class for table column hiding?

推荐答案

我终于找到了一个替代方案:

I finally found that exists a workaround replacing:

visible-desktop

hidden-phone hidden-tablet

希望对某人有所帮助!

这篇关于Twitter Bootstrap 响应式 - 仅在桌面上显示表格列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆