Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.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_Background Image_Background Color - Fatal编程技术网

Html CSS-当我使用渐变背景时,我发现图像消失了

Html CSS-当我使用渐变背景时,我发现图像消失了,html,css,background-image,background-color,Html,Css,Background Image,Background Color,我知道我很可怜,但我有个问题: 在我的主页中,我使用了一幅图片和一种颜色作为页面的背景。一切正常,但结果…嗯。然后我在互联网上找到了一些代码,可以在背景色上获得一种美妙的渐变色。我认为它会以惊人的方式改进页面 但是 图像消失了。。。如果我把“互联网代码”作为渐变色,图像就会回来。 代码如下: #particles-js { width: 100%; /*from here the image*/ background-image: url('../images/Image.png

我知道我很可怜,但我有个问题:

在我的主页中,我使用了一幅图片和一种颜色作为页面的背景。一切正常,但结果…嗯。然后我在互联网上找到了一些代码,可以在背景色上获得一种美妙的渐变色。我认为它会以惊人的方式改进页面

但是

图像消失了。。。如果我把“互联网代码”作为渐变色,图像就会回来。 代码如下:

    #particles-js {
    width: 100%;
/*from here the image*/
background-image: url('../images/Image.png');
background-repeat: no-repeat;
background-position: center;
background-size: 40% ;
/*from here the code I found on internet*/
background: #e0f3fa;  
background: -moz-radial-gradient(center, ellipse cover,  #e0f3fa 0%, #d8f0fc 57%, #4dc8f0 100%, #b6dffd 100%);  
background: -image-webkit-radial-gradient(center, ellipse cover,  #e0f3fa 0%,#d8f0fc 57%,#4dc8f0 100%,#b6dffd 100%);  
background: radial-gradient(ellipse at center,  #e0f3fa 0%,#d8f0fc 57%,#4dc8f0 100%,#b6dffd 100%); 
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e0f3fa', endColorstr='#b6dffd',GradientType=1 ); 
}

多谢各位

请给我们看看你的css,因此,我们可以更好地帮助您。我认为这个答案就是您要寻找的,因为渐变背景不是一种颜色…它被视为背景图像,因此覆盖了您以前的规则。这是因为
background
属性覆盖了先前的
background mage
background
是定义一切的快捷方式关于背景。这意味着如果使用
background
,也可以定义
background图像。请注意,您不能在同一个分区上同时使用线性渐变和背景图像。请向我们展示您的css,因此,我们可以更好地帮助您。我认为这个答案就是您要寻找的,因为渐变背景不是一种颜色…它被视为背景图像,因此覆盖了您以前的规则。这是因为
background
属性覆盖了先前的
background mage
background
是定义一切的快捷方式关于背景。这意味着如果使用
background
,也可以定义
background图像。还要注意,不能在同一个div上同时使用线性渐变和背景图像