本文介绍了奇数边框+填充行为:跨浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 大家好, 我已经通过谷歌,一点点回击,css讨论档案, 并向列表发送请求一切都无济于事。我咨询了 positioniseverything.net和quirksmode.org。我所遇到的问题似乎很简单,以至于我已经在任何这些来源上提出了这个问题,但是, 唉,事实并非如此。 所以,请参考 http://www.erectlocution.com 有问题的页面。以下是问题: (a)IE 6 此浏览器在呈现页面时出现一些问题。带有ID #contentWrapper的 div的边框在初始加载时渲染得很好,但是 是每个右边界和左边界的一部分,不会被渲染 在折叠下方,即在渲染页面的底部下方,即在垂直滚动时显而易见的。当 向上滚动时,也会发生这种情况 - 页面顶部先前渲染的边框渲染效果不佳。 此外,当鼠标悬停在一个链接上时,边框渲染变为 不同,如果可预测的话,破坏:左边和右边的某些部分 $ b $ W的边界消失,从大约100px开始,它的上边缘和上边缘的50px左右。无论如何,对我来说,它很容易重现。 最后 - 这可能是在quirksmode.org上的某个地方或 positioniseverything.org,但 我的优先级较低 - #header div和 $之间存在3px之间的差距b $ b #contentWrapper div。无论我是否通过条件评论提供IE特殊的 渲染说明,都会发生这种情况。 (b)Firefox 1.0.7 / WinXP和Mac OS X #header与#contentWrapper div之间的差距大约为15px。我已经浏览了相当贫血的 CSS,但在代码本身中没有找到任何理由。 XHTML和CSS都验证了它的价值。我已经应用了一个负的 保证金,对于FF,它工作得很好,但是这导致Safari显示右边框的一部分右边框重叠了15px。那么, Safari会让页面比我尝试过的任何东西都更好。 总的来说,它并不是关键的错误;但我真的很喜欢这样一个简单的网站来渲染这个简单的网站。我很欣赏任何提示和指示 的方式。 谢谢, DanielHi all,I''ve trolled through Google, a little of evolt, css-discuss archives,and sent the list a request, all to no avail. I consultedpositioniseverything.net and quirksmode.org. The issue I have seemssimple enough that I''d have turned it up on any of those sources, but,alas, that''s not the case.So, please refer to http://www.erectlocution.comfor the page in question. Here are the issues:(a) IE 6This browser has some issues rendering the page. The borders of thediv with ID #contentWrapper render fine on initial loading, but thereis a portion of each of the right and left borders which isn''t rendered"below the fold", i.e. below the bottom of the rendered page, which isevident on vertical scrolling. This behavior also occurs whenscrolling back up--the previously rendered border at the top of thepage is poorly rendered.Additionally, when mousing over a link, the border rendering becomesdifferently, if predictably, broken: some part of the left and rightborders of #contentWrapper disappear, starting around 100px below it''stop edge and 50px or so above its bottom edge. It''s easilyreproducible, for me anyway.Lastly--and this is probably somewhere on quirksmode.org orpositioniseverything.org, but oflower priority for me--there is a gap of something like 3px between the#header div and the#contentWrapper div. This happens whether or not I feed IE specialrendering instructions via conditional comments.(b) Firefox 1.0.7 / WinXP and Mac OS XThere is a gap of about 15px between the #header and #contentWrapperdivs rendered via Firefox. I have scoured through the fairly anemicCSS and not found any reason for this in the code itself. Both theXHTML and CSS validate, for what it''s worth. I had applied a negativemargin, which, for FF, worked perfectly, but which caused Safari todisplay part of the right border overlapping the header by those 15px.Safari, then, renders the page better than anything else I''ve tried.Overall, it''s not critical faultiness; but I''d really like such asimple site to render nicely. I appreciate any tips and pointers alongthe way.Thanks,Daniel推荐答案 这篇关于奇数边框+填充行为:跨浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-31 04:12