Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.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 将图像放在RGBA后面_Html_Image_Rgba - Fatal编程技术网

Html 将图像放在RGBA后面

Html 将图像放在RGBA后面,html,image,rgba,Html,Image,Rgba,RGBA,我该怎么把图像放在后面 原始代码: <div style="width: 266px; height: 266px; border: 3px solid red; background: linear-gradient(to top left, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 49.25%, rgba(0,255,0,1) 50%, rgba(0,0,0,0) 50.75%, rgba(0,0,0,0) 100%), lin

RGBA,我该怎么把图像放在后面

原始代码:

<div style="width: 266px; height: 266px; border: 3px solid red;
  background: 
    linear-gradient(to top left, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 49.25%, rgba(0,255,0,1) 50%, rgba(0,0,0,0) 50.75%, rgba(0,0,0,0) 100%), 
    linear-gradient(to top right, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 49.25%, rgba(255,230,0,1) 50%, rgba(0,0,0,1) 50.75%, rgba(0,0,0,1) 100%);">
</div>

我将其更改为:但它不起作用

<div style="width: 266px; height: 266px; border: 3px solid red;
  background: 
    linear-gradient(to top left, rgba(225, 225, 225, 0.0) 0%,
           rgba(225, 225, 225, 0.0) 49.25%,
           rgba(0,255,0,1) 50%,
           rgba(225, 225, 225, 0.0) 50.75%,
           rgba(225, 225, 225, 0.0) 100%), 
    linear-gradient(to top right, rgba(225, 225, 225, 0.0) 0%,
           rgba(225, 225, 225, 0.0) 49.25%,
           rgba(255,230,0,1) 50%,
           rgba(225, 225, 225, 0.0) 50.75%,
           rgba(225, 225, 225, 0.0) 100%), url(\'http://via.placeholder.com/260x260\');">
</div>

只需从图像url中删除不需要的
\
。检查下面的代码段以供参考


只需从图像url中删除不需要的
\
。检查下面的代码段以供参考


创建内容包装,并将图像作为包装的背景

.wrapper{
背景:url('http://via.placeholder.com/260x260');
高度:260px;
宽度:260px;
}
rgba先生{
背景:rgba(100255,0.5);
高度:260px;
宽度:260px;
}

创建内容包装,并将图像作为包装的背景

.wrapper{
背景:url('http://via.placeholder.com/260x260');
高度:260px;
宽度:260px;
}
rgba先生{
背景:rgba(100255,0.5);
高度:260px;
宽度:260px;
}


是。谢谢,是的。非常感谢。