位置的奇怪webkit问题:固定 [英] Weird webkit issue with position: fixed

查看:118
本文介绍了位置的奇怪webkit问题:固定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://workshop.wpcoder.com/daniel/tvexperts/

在Chrome中,如果您单击生产,然后单击联系人位置:固定标题消失,但在移动滚轮时返回。我不知道原因是什么,到目前为止,我只能在Safari和Chrome中检测它,但Firefox是好的,所以我认为这是一个webkit错误。

In Chrome, if you click "Production" and then "Contact" the position: fixed header disappears, but comes back when you move the scrollwheel. I have no idea what the cause is, and so far I can only detect it in Safari and Chrome, but Firefox is fine so I think it is a webkit bug.

推荐答案

实际上如果你看着它关闭,在Firefox也有同样的错误。区别在于,它显示较少的内容从上一个链接。也许你的问题可以解决在CSS中定义一个min-height值的链接的div。

Actually if you watch it close, in Firefox also has the same bug. The difference is that in there it show less content from the previous link. Perhaps your problem can be solved defining, in CSS, a min-height value for the divs of the links.

div#contact {
min-height:700px;
height:auto
}

在本地测试后,我看到了真正的问题:)。我创建了一个correction.css,并在Opera 11,Safari 5,Firefox 3.6,Firefox 4.0 beta 11和Chrome 9都在Mac OS X上测试。文件具有以下内容:

After a local test I saw the real problem :). I've created a correction.css and tested in Opera 11, Safari 5, Firefox, 3.6, Firefox 4.0 beta 11 and Chrome 9 all on Mac OS X. File has this content:

html, body {height:100%;overflow:auto}/* makes the the magic trick of disappearance, disappear */
#contact {min-height:700px;height:auto}/* makes the contact div h2 closer to the top */

这篇关于位置的奇怪webkit问题:固定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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