CSS缩小窗口时,背景图出现右侧空白

缩小窗口时CSS背景图出现右侧空白BUG的解决方法(兼容各浏览器)



解决办法:

在css内加入如下两行代码,让它自己判断:

width:expression(document.body.clientWidth <= 960? "960px": "auto");
min-width:960px;

即:

.top{
    border:0px solid #f00;
    width:expression(document.body.clientWidth <= 960? "960px": "auto");
    min-width:960px;
    height:29px;
    margin:0px;
    padding:0px;
    url(.. /img/topbar.png) repeat-x;
}


ok,这个bug终于解决了。

你可能感兴趣的:(css,窗口缩小,移动滚动条,背景空白)