2016-05-14 158 views
0

我试图在safari上获得一个简单的响应表。响应式数据表不能在Safari浏览器工作

我试图在小屏幕上将所有表格元素设置为display:block,以便它们堆叠在一起。

@media only screen and (max-width: 760px) { 

    table, thead, tbody, th, td, tr { 
     display: block; 
    } 

    td:empty { 
     display: none; 
    } 

} 

技术解释为here

我试图让this simple jsbin工作,这是我得到:

enter image description here

回答

1

今天我有同样的问题,我的问题是我没有在文档类型注释html标题。

<!DOCTYPE html> 
<html> 
etc... 

此修复您的jsbin样品太...

enter image description here

-1

我使用的是语义的用户界面,并已与在Safari同样的问题挣扎。

添加<!DOCTYPE html>为我解决了这个问题。

+0

感谢您的回答!但它看起来像半年前已经提供了[完全相同的答案](http://stackoverflow.com/a/37898979/660921)? – Carpetsmoker

相关问题