我目前有一个图像,是一个特定的高度和宽度,我如何设置一个特定的颜色,以无休止地运行在图像下。
body {
background-image: location;
background-color: #fff;
}我希望背景颜色在背景图像的下面,而不是整个页面,而是在它的下面。
更新
html的背景颜色:#red
车身背景图片:.png图片&背景颜色:#fff;
我希望背景颜色不会溢出html颜色,这是顶部,而只是溢出从主体的背景图像。
发布于 2014-01-08 23:18:53
使用以下代码:
background:#ffffff url(ImageUrl) no-repeat;发布于 2014-01-08 23:19:41
尝尝这个
background:red url(../img/s.jpg) no-repeat center top;或
background-color: red;/*...background colour..*/
background-image: url(../img/s.jpg);/*...image source...*/
background-position: center top;/*...position of background image...*/
background-repeat: no-repeat;/*...it will avoid repetition of image..*/https://stackoverflow.com/questions/20999357
复制相似问题