Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/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
Css 抵消背景,同时保持其响应性_Css - Fatal编程技术网

Css 抵消背景,同时保持其响应性

Css 抵消背景,同时保持其响应性,css,Css,我试图将三件事结合起来: 梯度背景 偏移背景 背景图像 我基本上想要实现我在下面的JSFiddle中所拥有的东西,但是不管大小,梯度都会跟随 我该怎么做?制作-背景位置:100%;意志work@PraveenPoonia不,效果与封面不同。请尝试分别指定每个图像的位置和大小,例如:背景图像:线性渐变(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),url(“);背景大小:自动,封面;背景位置:50%计算(50%-150px),0; backgrou

我试图将三件事结合起来:

  • 梯度背景
  • 偏移背景
  • 背景图像
我基本上想要实现我在下面的JSFiddle中所拥有的东西,但是不管大小,梯度都会跟随


我该怎么做?

制作-背景位置:100%;意志work@PraveenPoonia不,效果与封面不同。请尝试分别指定每个图像的位置和大小,例如:背景图像:线性渐变(rgba(255,255,255,0.5),rgba(255,255,255,0.5)),url(“);背景大小:自动,封面;背景位置:50%计算(50%-150px),0;
background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url("https://c.tadst.com/gfx/750w/sunrise-sunset-sun-calculator.jpg");
background-size: cover;
background-position: 50% calc(50% - 150px);
background-repeat: no-repeat;