h1 标签的内容在 IE 6 中鼠标悬停之前不可见
我在此页面上看到的奇怪症状(仅当使用 IE 6 查看时)是当页面加载或调整大小时,
标记的文本是不可见的,但当我将鼠标悬停在它出现在左上角的区域上时,该文本就会出现。我还没有在任何其他浏览器中看到过这种情况,我为任何 h1 标签修改的唯一 CSS 属性是:
- font-size
- font-weight
- margin, margin-top
- padding, padding-top, padding-bottom
我无处可去更改 visible
或 display
,并且 h1 没有悬停效果。甚至标题内的非链接文本也会消失。有什么想法吗?
The bizarre symptom I'm seeing on this page (only when viewing with IE 6) is that the text of the <h1>
tag is invisible when the page is loaded or resized, but appears when I mouse over the region where it appears in the upper-left corner. I haven't seen this with any other browser, and the only CSS attributes I'm modifying for any h1 tag are these:
- font-size
- font-weight
- margin, margin-top
- padding, padding-top, padding-bottom
Nowhere do I change visible
or display
, and there are no hover effects for the h1. Even the non-link text inside the header disappears. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这很可能是由页面上的另一个样式元素引起的。
我认为你最好的选择是反复试验...从页面中删除所有样式,验证 h1 元素不再消失,然后重新添加其他样式,直到找到罪魁祸首
More than likely this is being caused by another styled element on the page.
I think your best option is trial and error... Removing all styles from the page, verifying the h1 element is no longer disappearing, and then re-adding the other styles until you've found the culprit
同意约翰的帖子。我(纯粹是运气好)有时能够通过给元素
position:relative
或position: static
规则来绕过这个调试过程。因此,在沿着约翰的路线前进之前,您可能需要祈祷并尝试一下。
Agreeing with John's post. I have (by sheer luck) been able to circumvent this debugging process on occasion by giving the element
position: relative
orposition: static
rules.So you may want to cross your fingers and give that a whirl before going down John's route.
我没有看到任何明显明显的东西,但你确实通过悬停应用了 rgba。
另外,这在我的 IE6 本地工作,所以我不确定它的行为是否会由于 Internet Explorer 中的关联区域(内联网、受信任的、Internet)而有所不同。
我完全同意其他发帖者的观点,即这将是一个调试练习。我喜欢约翰的试错法。
I didn't see anything blatantly obvious but you do have rgba being applied via an hover.
Also, this works locally with my IE6 so I'm not sure if maybe it behaves differently due to the associated zone in Internet Explorer (intranet, trusted, Internet).
I wholeheartedly agree with the other posters that this will be an exercise in debugging. I like John's technique of trial and error.
虽然我没有看到标题列出
hasLayout
属性,但您可能需要尝试将zoom:1;
添加到h1
并查看你会得到什么结果。这使得我在测试时始终可以看到文本。确实这个问题看起来很奇怪。
Although I don't see a
hasLayout
attribute listed for the heading, you may want to try addingzoom:1;
to theh1
and see what results you get. This made the text visible for me consistently when testing.Indeed this problem seems pretty bizarre.