IE9链接悬停CSS颜色改变垂直移位
IE 9 将鼠标悬停在链接上时,会将一些 HTML 推送到页面下方。 当我去除颜色时,
td.subarea > h2 > a:hover { color: #aa051a; text-decoration: none;}
问题就不会发生。
我无法将所有代码粘贴到此处,并且相当确定这是此页面的独特问题。 但也许有人见过类似的东西。
它不会将链接(标签)移动到页面下方,而是移动整个包含的表格。
IE 9 on Hover over a link, pushes some of the HTML down the page.
When i remove the color from
td.subarea > h2 > a:hover { color: #aa051a; text-decoration: none;}
the problem does not occur.
I can't paste all the code here, and fairly sure its a unique problem to this page.
But maybe someone out there has seen something similar.
Its not moving the Link(a tag) down the page, its the whole containing table that moves.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
当容器元素设置为
overflow: auto
并且子元素中发生一些悬停操作时,在 IE9 中似乎会出现此问题。有一个非常简单的解决方案,将
min-height: 0px
添加到容器元素,并且有效。该错误的详细解释和解决方案可以在此链接中找到:
http://blog.brianrichards.net/post/6721471926/ie9-hover -错误解决方法
This problem seems to occur in IE9 when the container element is set to
overflow: auto
and there is some hover action taking place in the child element.There is a very simple solution of adding
min-height: 0px
to the container element, which works.The detailed explanation of the bug and this solution can be found in this link:
http://blog.brianrichards.net/post/6721471926/ie9-hover-bug-workaround
确保正常和悬停时的行高和字体大小属性相同。
Make sure your line-height and font-size properties are the same for normal and hover.
找到了问题所在,很好地让桌子停止移动。顶部边距:-20px。
尽管它向下移动了大约 10px。
可能是一些 IE9 渲染问题。 IE7/8 实际上在初始加载时移动了表格。
字体大小、行高以及所有 CSS 都对链接有好处。
Marc B 可能接近 IE 渲染错误并导致浮动等混乱的问题。
现在必须在表格布局页面中设置表格布局的真实样式(呃,讨厌表格布局)。
Sort of found the problem, well makes the table stop moving. margin-top:-20px.
Although it olny shifted down about 10px.
Probably some IE9 rendering issue. IE7/8 actually move the table on intial loading.
The font sizes, line-heights, all that css, is all good for the link.
Marc B is probably close to the issue of IE rendering something wrong and cauing floats and such to mess up.
Now have to real style a table layout wihtin a table layout page(ugh, hate table layout).
对我来说,我必须指定
然后我必须继续并指定
上面的 mohitp 的“min-height:0px”让我走上了正确的轨道。
For me I had to specify
Then I had to go ahead and specify
The 'min-height: 0px' by mohitp above got me on the right track.