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

Html 后台CSS不显示在包装器后面

Html 后台CSS不显示在包装器后面,html,css,background-image,wrapper,Html,Css,Background Image,Wrapper,我在CSS中尝试了背景图像标记,也在HTML中尝试了一个标记。我无法在包装纸后面看到任何东西。我可以让我的包装背景以颜色显示,但这是不可能的 html, 身体{ 背景图像:url(“https://vgy.me/u/TpG24N"); 文本对齐:居中; 身高:100%; } #包装纸{ 利润率:2%自动; 宽度:875px; 身高:80%; 框大小:边框框; 背景色:rgb(250194245) } #子包装{ 位置:相对位置; } 您在#wrapper中设置了背景色,该背景色不会显示其背后的任

我在CSS中尝试了背景图像标记,也在HTML中尝试了一个标记。我无法在包装纸后面看到任何东西。我可以让我的包装背景以颜色显示,但这是不可能的

html,
身体{
背景图像:url(“https://vgy.me/u/TpG24N");
文本对齐:居中;
身高:100%;
}
#包装纸{
利润率:2%自动;
宽度:875px;
身高:80%;
框大小:边框框;
背景色:rgb(250194245)
}
#子包装{
位置:相对位置;
}

您在
#wrapper
中设置了背景色,该背景色不会显示其背后的任何内容。简单设置:

#wrapper{
 background-color: transparent;
}
现在
#wrapper
后面的元素将显示出来

编辑“:

如果需要,还可以将其设置为半透明,保持颜色不变,并将不透明度设置为0到1之间的值,如下所示:

#wrapper {
    background-color: rgb(250, 194, 245)
    opacity: 0.5;
}

现在,
#包装器
将具有半透明颜色。尝试使用正确的不透明度值,直到它看起来像您想要的。

您的背景图像url
https://vgy.me/u/TpG24N
不是指图像,你是说
https://vgy.me/TpG24N.jpg

html,
body {
    background-image: url("https://vgy.me/TpG24N.jpg");
    text-align: center;
    height: 100%;

}

您没有添加图像扩展URL

html,正文{
背景图像:url(“https://vgy.me/u/TpG24N");
文本对齐:居中;
身高:100%;

}
请添加您的HTML代码,我们不知道您的样式指的是什么(div、图像、段落?),您已在包装后面放置了一个图像,但图像url不正确。用扩展名.jpg或.png等来定义图像url,我更改了它并更正了url,它工作了!!非常感谢。