HTML Dog
跳至导航

CSS 属性:background-image

元素的背景图像。

可能的值

注意示例
none
[URL]图像文件的位置。url("imageFile.jpg")
[URL], [URL]多个背景图像可以用逗号分隔。第一张图像将放置在最上面,“最接近”用户。后续图像将放置在它之前的图像下方。url("upperImage.png"), url("lowerImage.png")
inherit
initial
unset

示例


#plow {
    background-color: #f80;
    background-image: url("imageFile.png");
}
/* Applies "imageFile.png" on top of an orange background. */

#authors {
    background-color: #fff;
    background-image: url("tom.jpg"), url("jane.jpg"), url("bozza.jpg");
}
/* Applies Tom on top of Jane on top of Bozza on top of a white background. */

浏览器支持