背景在IE8中不起作用

时间:2013-03-05 04:22:28

标签: html css internet-explorer cross-browser

当我放下以下css时,背景图像不会进入ie8和ie7。

#bottom-thumb2{     
    width: 212px;
    height:300px;
    /*margin:5px 5px 5px 5px;*/
    padding:7px;
    width:23%;
    border-right:2px #cecece solid;
    background: url(../images/user912_modules_bg.png)repeat-y scroll right center rgb(255, 255, 255) ;
    font-size: 11px;
    float:left;
    overflow:auto;
}

2 个答案:

答案 0 :(得分:2)

您在此行url(../images/user912_modules_bg.png)repeat-y而不是url(../images/user912_modules_bg.png) repeat-y错过了空间。


试试这个:

background: url(../images/user912_modules_bg.png) repeat-y scroll right center rgb(255, 255, 255) ;

为避免混淆,请单独声明。像这样的东西:

background-image: url(../images/user912_modules_bg.png);
background-repeat: repeat-y;
background-attachment: scroll;
background-position: right center;
background-color: rgb(255, 255, 255) ;

答案 1 :(得分:0)

你应该使用什么宽度? 图像的宽度是多少? 212px还是23%?您目前正在定义/使用两者......

相关问题