html,css设置了纯黑背景之后,其他文本内容都不显示了

结果出来背景全黑,啥也没有


.section-content-container hgroup {
    margin: auto;
    text-align: center;
    letter-spacing: 2px;
    color: white;
    position: relative;
    right: -100%;
    opacity:1;   
}

.active .section-content-container hgroup {
    right: 0;
    opacity:1;
    color: white;
}

.section-content-container hgroup h2 {
    text-transform: uppercase;
    font-weight: normal;
    color: white;
}
.hgrouptext{
    color:white !important;
}
.section-content-container hgroup h3 {

    margin-top: 10px;
    color: white;
}

.white .section-content-container hgroup h3 {
    color:white;
}


<div class="section-content-container" >
                    <hgroup>
                        <h2 style="color:#fff;">关于我们</h2>
                        <h3 style="color:#fff;">ABOUT US</h3>
                    </hgroup>
                </div>

这是设置背景的句子

这种问题要自己调试。用浏览器然后按f12。通过调节颜色的透明的就可以判断是否层叠了

设置一下层级 z-index:999;试试

比如:

<div style="background-color: #000">
    <h2 style="color: #FFF">关于我们</h2>
</div>

关于我们

请采纳

right: -100%;出现滚动条,没有设置背景颜色为黑色





<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body bgcolor="black">
    <h1 style="color: #fff;">hi</h1>
    
</body>
</html>