溢出隐藏不工作在FF& IE [英] Overflow hidden not working in FF & IE

查看:135
本文介绍了溢出隐藏不工作在FF& IE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图隐藏在 display:table 的容器中的x轴溢出。 Chrome和Safari中隐藏了溢出。正如标题所示,然而,FF& IE 11。



我的小提琴: https:// jsfiddle.net/z6wLnsas/1/



我已经尝试了 overflow:hidden overflow-x:hidden ,但问题仍然存在于已识别的浏览器中。

解决方案

<由于某些原因,溢出属性不能在表上工作。相反,尝试把你的表(或div与显示:表)在另一个div。



p>

 < div id ='container'> 
< div id ='my-table-div'>
随机内容
< / div>
< / div>

然后将溢出属性放在容器上。


I have overflow on the x-axis that I'm trying to hide in a container of display:table. The overflow is hidden in Chrome and Safari. As the title suggests, however, this is not happening in FF & IE 11.

My fiddle: https://jsfiddle.net/z6wLnsas/1/

I have tried both overflow: hidden and overflow-x: hidden, but the issues still persists in the identified browsers.

解决方案

For some reason, the overflow properties do not work on tables. Instead, try putting your table( or div with display: table) in another div.

Something like

<div id='container'>
    <div id='my-table-div'>
    Random content
    </div>
</div>

Then put the overflow property on the container.

这篇关于溢出隐藏不工作在FF&amp; IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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