首页 > 解决方案 > 如何让图像显示在标题图像之上

问题描述

我给了我的侧边栏一个负的上边距,以在标题黄色图像的顶部显示图像,但我无法让侧边栏图像显示在顶部。我添加了 position: relative 并使用 z-index 播放,但没有任何效果。

这是页面

这是我拥有的CSS代码-

.reciperight {
float: right;
width: 28%;
color: #512e70 !important;
font-size: 18px !important;
position: relative;
margin-top: -200px;
}

标签: wordpressz-index

解决方案


我检查了您的页面,您的父#primaydiv 中有一个 CSS 代码使图像隐藏。更改溢出hidden to visible,您的问题将像下面这样解决。

#primary {
        float: left;
        overflow: visible;
        width: 100%;
    }

结果

在此处输入图像描述


推荐阅读