Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何定义多个CSS背景属性?_Html_Css - Fatal编程技术网

Html 如何定义多个CSS背景属性?

Html 如何定义多个CSS背景属性?,html,css,Html,Css,有可能让这些背景一起工作吗 background: url("../images/search.png") no-repeat scroll 9px 4px transparent; background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #fdca14), color-stop(1, #ff8d02) ); background:-moz-linear-gradient( center top, #fd

有可能让这些背景一起工作吗

background: url("../images/search.png") no-repeat scroll 9px 4px transparent;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0, #fdca14), color-stop(1, #ff8d02) );
background:-moz-linear-gradient( center top, #fdca14 0%, #ff8d02 100% );
谢谢:)

允许。以下是在同一背景中使用多个背景图像的示例:

.exampleClass {
    background-image: url(images/example1.png), url(images/example2.png);
    background-repeat: repeat-x, repeat;
}
它在中受支持(IE8及之前版本除外)

允许它。以下是在同一背景中使用多个背景图像的示例:

.exampleClass {
    background-image: url(images/example1.png), url(images/example2.png);
    background-repeat: repeat-x, repeat;
}
它在(IE8及之前版本除外)CSS中受支持

.class{
    background: url("../images/search.png") no-repeat scroll 9px 4px transparent,-webkit-gradient( linear, left top, left bottom, color-stop(0, #fdca14), color-stop(1, #ff8d02) ),-moz-linear-gradient( center top, #fdca14 0%, #ff8d02 100% );
}
CSS

.class{
    background: url("../images/search.png") no-repeat scroll 9px 4px transparent,-webkit-gradient( linear, left top, left bottom, color-stop(0, #fdca14), color-stop(1, #ff8d02) ),-moz-linear-gradient( center top, #fdca14 0%, #ff8d02 100% );
}

如果需要在较旧的IE浏览器中执行此操作,您可能还想查看

如果您需要在较旧的IE浏览器中执行此操作,您可能还需要查看