Z-index不起作用 [英] Z-index Won't Work
本文介绍了Z-index不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
Css z-index问题
是另一个的前面,z指数不似乎改变它。
我试图使它,所以标志在灰色条形图的顶部。
I have an issue where one image is infront of another and z-index doesnt seem to change it. I am trying to make it so the logo is on top of the gray bars image.
任何人都可以向我解释为什么这不起作用。
Can anyone explain to me why this is not working?
推荐答案
p> z-index
只适用于 position relative,absolute&固定
。因此,将位置:相对
添加到您的标志
z-index
is only work with position relative,absolute & fixed
. So, give position:relative
to your logo
更新:
在这里我改变标记,因为我们从不把块
c $ c> inside a inline
元素。 < a>
是 inline元素
h1
是封锁元素
in this i change in markup because we never put block
element inside
an inline
element. <a>
is an inline element
& h1
is a block element
这篇关于Z-index不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文