Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.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,我试图复制这个错误,但没有发生。 我遇到的问题是,粘性标题(在我真正的应用程序中是一个简单的div作为工具栏)只有在悬停在列表(ul或ol)上时才会变得透明() 有人知道为什么会发生这种情况以及如何预防吗 我试图通过将其设置为1来强制不透明度,我甚至尝试了背景颜色之外的背景图像 .menubar { background-color: #f8f8f8 !important; height: -moz-fit-content; height: fit-content;

我试图复制这个错误,但没有发生。 我遇到的问题是,粘性标题(在我真正的应用程序中是一个简单的div作为工具栏)只有在悬停在列表(ul或ol)上时才会变得透明()

有人知道为什么会发生这种情况以及如何预防吗

我试图通过将其设置为1来强制不透明度,我甚至尝试了背景颜色之外的背景图像

.menubar {
    background-color: #f8f8f8 !important;
    height: -moz-fit-content;
    height: fit-content;
    padding-bottom: 0px;
    width: 100%;
    padding-top: 1px;
    position: sticky;
    bottom: 0;
    display: flex;
    align-content: center;
    align-items: center;
    background-image: url(https://www.fapceramiche.com/media/products/images/article/generated_fap_sheer_2020_beige_matt_R10_90x90_002_fPB0_hr.jpg.520x516_q85_crop_upscale.jpg);
    opacity: 1;
} 

尝试添加一个大数字的z-index,如下所示,
z-index:100