【发布时间】:2011-09-25 22:29:57
【问题描述】:
我遇到了一个非常奇怪的问题,不知道如何解决它。出现问题的网页有一个 div,其中有几个水平的可点击图像。当悬停可点击图像 () 时,15 像素的边框会改变颜色,当离开悬停状态时,边框颜色会再次变为原始颜色。奇怪的问题是,当我将任何图像悬停在 div 中或离开悬停状态时,div 下的边距不断扩大,这当然是不可接受的。 此问题仅在 IE9 中出现。 Chrome 和 Firefox 运行良好。我没有在以前的 IE 版本上测试过。 我认为问题可能出在以下 CSS 语句中:
#content_links #fotos #foto{
text-align: center;
width: 488px;
overflow-y: hidden;
white-space: nowrap;
margin-left: 22px;
margin-bottom: 70px;
}
#content_links #fotos #foto a{
text-decoration: none;
}
#content_links #fotos #foto img{
margin-left: 3px;
margin-right: 3px;
margin-bottom: 6px;
border: 3px solid silver;
border-bottom-width: 15px;
}
#content_links #fotos #foto a:hover img{
border: 3px black solid;
border-bottom-width: 15px;
}
有解决这个问题的线索吗?提前致谢,
托马斯
【问题讨论】:
-
当我的 div 有一些溢出时,我也会遇到同样的问题。如果我将 div 修复为足够大以包含所有内容而不会溢出,则问题不会发生。
标签: hover internet-explorer-9 border margin