Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.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
在css3中定位多个背景_Css_Background_Background Image - Fatal编程技术网

在css3中定位多个背景

在css3中定位多个背景,css,background,background-image,Css,Background,Background Image,我有以下设置 background-image: url(image1.png) , url(image2.png); 想法是,image1.png到处重复,而image2.png应该只从页面顶部开始200px,并且只从repeat-x开始。我知道你可以像这样定位背景: background-position: top left, left bot etc... 但我如何从页面顶部定位它200px?并使其成为repeat-x?您需要使用速记作为背景: {background: url(ima

我有以下设置

background-image: url(image1.png) , url(image2.png);
想法是,
image1.png
到处重复,而
image2.png
应该只从页面顶部开始200px,并且只从
repeat-x
开始。我知道你可以像这样定位背景:

background-position: top left, left bot etc...

但我如何从页面顶部定位它200px?并使其成为
repeat-x

您需要使用速记作为背景:

{background: url(image1.png) repeat, url(image2.png) 0 200px repeat-x;}