本文介绍了溢出:overlay在firefox中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网站上,我需要为< div> 使用css属性 overflow:overlay / p>

然而,它不是在浏览器中呈现,而且在萤火虫中检查css显示,它甚至不在那里,但它是在Chrome中工作。我还没有测试出safari。

必须改变以获取溢出:overlay css属性的工作?



谢谢

解决方案

溢出的可能值为:

 可见
隐藏
自动
滚动

请参阅或讨论这些问题。



在不同浏览器中使用任何其他值将产生不可预知的结果,因为它们以不同的方式处理不正确的值。
$ b 编辑:关注评论,我已经设法找到溢出:overlay 。


$ b 叠加层描述为:

重要的是它还表示只能在Safari或Chrome(即WebKit)中工作。



表明它不是在任何情况下,这个世界都是这样的:

2016年3月更新
$ b

看起来像溢出:overlay 还没有消失。有迹象表明它正在进入标准。
$ b

overlay 和 auto 只能是滚动条会出现在页面内容的顶部,而不会导致它占用布局空间。



请参阅。


On my website I need to use the css property overflow: overlay for a <div>.

However, it is not rendering in the browser and an inspection of the css in firebug shows that it isn't even there, but it is as it works in Chrome. I havn't tested out safari.

What must I change to get the overflow: overlay css property working?

Thanks

解决方案

Possible values for overflow are:

visible
hidden
auto
scroll

See here or here for a discussion of these.

Using any other value in different browsers will yield unpredictable results as they handle the incorrect value differently.

Edit: Following the comment, I've managed to find mention of overflow:overlay here.

overlay is described as:

Importantly its also said only to work in Safari or Chrome (ie WebKit).

This item on WebKit bugzilla suggest it is not long for this world in any case:

Update March 2016

Looks like overflow: overlay hasn't gone away. There are signs of it working it's way into the standards.

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.

See here for the discussion.

这篇关于溢出:overlay在firefox中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 09:07