IE9,表和显示:块 [英] IE9, tables, and display: block

查看:106
本文介绍了IE9,表和显示:块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我网站的低宽版移动版本,我切换某些表的显示 tr td th block ,让它们垂直堆叠。我使用它作为一种技术,允许宽表继续显示所有的内容,而不溢出他们的容器。



它在所有现代5种浏览器中都能正常工作,但在IE9中不工作。



这里是一个jfiddle:

  td {
width:100%\9;
float:left\9;
}

在TD上添加一个宽度并将其浮动。


For the low-width mobile version of my site, I switch the display of certain table, tr, td, and th to block, to let them stack vertically. I use this as a technique to allow wide tables to continue to display all of their content without overflowing outside of their container.

It works perfectly in all of the modern 5 browsers, but does not work in IE9. Is there a way to do this there?

Here is a jfiddle: http://jsfiddle.net/cfCzD/4/

Here are screenshots

IE11 (Goal):

IE9 (Bad result):

解决方案

http://jsfiddle.net/xnKTH/

td {
    width: 100%\9;
    float: left\9;
}

Add a width on the TD and float it.

这篇关于IE9,表和显示:块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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