【问题标题】:IE8: border + background-image problemIE8:边框+背景图片问题
【发布时间】:2009-09-06 06:00:05
【问题描述】:

我有一个带有背景图像重复 x + 边框的跨度。

出于某种原因,仅在 IE8(甚至 IE7/6 中)中,图像会隐藏左边框。

当我将左边框设置为 2px 时,我可以看到 1px 边框

我的代码:

<span class="smallTab calTab calTabUnSel"></span>

.smallTab{text-align:center; border:1px solid #A0A0A0; border-bottom:none; font-size:15px; font-weight:bold; cursor:pointer;}
.calTab{position:relative; float:right; height:20px; width:85px; margin-left:4px;}

.calTabUnSel
{
    background-image: url(../images/tabNoSel.gif);
    background-repeat: repeat-x;
    background-color: #C0BFBD;
    color:#636363;
}

【问题讨论】:

  • 尝试删除 calTab 类中的 position:relative 并将 background-repeat 更改为 none?发生什么了?抱歉,我想帮忙,但我不在 IE8 上(仅限 IE7)
  • 它没有帮助。我也不使用 IE8,但有些用户使用。

标签: html css internet-explorer-8


【解决方案1】:

这是一个滚动问题。 边框问题只有在显示滚动条时才会出现,我的解决方法:

html {
    -ms-overflow-y: scroll;
    width:99.99%;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多