Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.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/4/powerbi/2.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
Jquery 能否将背景图像设置为svg<;路径>;并将背景附件设置为固定?_Jquery_Html_Css_Svg - Fatal编程技术网

Jquery 能否将背景图像设置为svg<;路径>;并将背景附件设置为固定?

Jquery 能否将背景图像设置为svg<;路径>;并将背景附件设置为固定?,jquery,html,css,svg,Jquery,Html,Css,Svg,我们可以将背景图像设置为svg并将背景附件设置为固定吗? 这是一个(cat)svg文件URL 如果我将其写入html文件,我希望在该svg结构上添加背景图像,并希望将背景附件设置为固定。根据情况判断,您似乎想知道如何设置背景图像,您可以这样做: <html> <head> <style> body{ background-image:url('https://upload.wikimedia.org/wikipedia/commons/

我们可以将背景图像设置为svg并将背景附件设置为固定吗?
这是一个(cat)svg文件URL


如果我将其写入html文件,我希望在该svg结构上添加背景图像,并希望将背景附件设置为固定。

根据情况判断,您似乎想知道如何设置背景图像,您可以这样做:

<html>
<head>
  <style>
    body{
      background-image:url('https://upload.wikimedia.org/wikipedia/commons/a/ab/Cat_black.svg');
      background-repeat:no-repeat;
      background-position:center;
      background-size:200px auto;
      background-attachment:fixed;
    }
  </style>
</head>
<body>
</body>
</html>

身体{
背景图像:url('https://upload.wikimedia.org/wikipedia/commons/a/ab/Cat_black.svg');
背景重复:无重复;
背景位置:中心;
背景尺寸:200px自动;
背景附件:固定;
}

如果您使用svg的
,我认为您不能将其作为背景。如果我错了,请纠正我嗨@CarlJan,谢谢你的回复。我在上面搜索过,我们可以制作一个模式标签,并通过填充:(“#id_of_pattern”)将其设置为路径的背景,但我想将其作为背景附件修复。真的吗?好吧,我想我错了,哈,请添加一个展示你所拥有的,并更清楚地解释你想要发生什么。请提供一个。我没有任何想象力,所以只是一个文字描述是不可能的。