溢出:覆盖在 Firefox 中不起作用 [英] Overflow: overlay doesn't work in firefox
问题描述
在我的网站上,我需要将 css 属性 overflow: overlay
用于
On my website I need to use the css property overflow: overlay
for a <div>
.
但是,它没有在浏览器中呈现,并且在 firebug 中对 css 的检查表明它甚至不存在,但它在 Chrome 中工作.我还没有测试过 safari.
What must I change to get the overflow: overlay
css property working?
我必须更改什么才能使 overflow:overlay
css 属性正常工作?
Thanks
谢谢
推荐答案
溢出的可能值是:
See here or here for a discussion of these.
在不同的浏览器中使用任何其他值会产生不可预测的结果,因为它们会以不同的方式处理不正确的值.
Edit: Following the comment, I've managed to find mention of overflow:overlay here.
编辑:在评论之后,我设法找到了关于溢出的提及:overlay 这里.
overlay is described as:
覆盖被描述为:
内容被剪裁并在必要时添加滚动条.
Importantly its also said only to work in Safari or Chrome (ie WebKit).
重要的是,它也只适用于 Safari 或 Chrome(即 WebKit).
This item on WebKit bugzilla suggest it is not long for this world in any case:
WebKit bugzilla 上的此项表明这个世界在任何情况:
WebKit currently has a proprietary CSS overflow value called "overlay" which is undocumented and as far as I can tell from reading the code works exactly like "auto".
WebKit 目前有一个名为overlay"的专有 CSS 溢出值.这是没有记录的,据我阅读代码可以看出,它的工作方式与自动"完全一样.
We should either remove it or rename it to "-webkit-overlay".
我们应该将其删除或将其重命名为-webkit-overlay".
Update March 2016
2016 年 3 月更新
看起来 overflow:overlay
并没有消失.有迹象表明它正在进入标准.
The difference between overlay
and auto
would only be that the scrollbars would appear over the top of the page content, and not cause it to take layout space.
overlay
和 auto
的区别仅在于滚动条会出现在页面内容的顶部,而不是占用布局空间.>
请参阅此处进行讨论.
See here for the discussion.
这篇关于溢出:覆盖在 Firefox 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!