我真的很难在旧的IE版本(6-8)上显示背景图像。
这是我的代码:
#top
{
background-image: url(http://some-domain.com/myimage.jpg) no-repeat;
background-color:#830703;
border-bottom: 1px solid #303130;
height: 128px;
width:100%;
overflow: hidden;
zoom:1;
}
我试过用许多不同的方式来写它,但它没有成功。
有谁有主意吗?
发布于 2013-12-05 09:22:02
这实际上不应该出现正确的,因为你有一个小的语法错误。你把背景-图像和背景-重复。要么使用背景快捷键,要么将它们分开:
background-image: url(http://some-domain.com/myimage.jpg);
background-repeat: no-repeat;
发布于 2013-12-05 09:17:22
使用下面的内容。
#top
{
background: url(http://some-domain.com/myimage.jpg) no-repeat #830703;
border-bottom: 1px solid #303130;
height: 128px;
width:100%;
overflow: hidden;
zoom:1;
}
希望这能有所帮助。
发布于 2013-12-05 09:20:54
使用以下任何一种
background-image: url(http://some-domain.com/myimage.jpg) no-repeat;
background-color:#830703;
background-repeat: no-repeat;
或
background: url(http://some-domain.com/myimage.jpg) no-repeat #830703;
https://stackoverflow.com/questions/20395846
复制相似问题