是否可能有一个子元素在其父元素后面的z-index [英] Is it possible to have a child element behind his parent element with z-index

查看:160
本文介绍了是否可能有一个子元素在其父元素后面的z-index的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可能有一个子元素在其父元素的z-index。
我想使用父div作为其内容的透明颜色层。

I would like to know if it possible to have a child element behind his parent element with z-index. I would like to use the parent div as transparent color layer on top of his content.

感谢

推荐答案

总之,不。 Child元素总是从其父元素继承z-index。

In short, no. The Child element always inherits the z-index from its parent.

查看文章:了解CSS z-index

这篇关于是否可能有一个子元素在其父元素后面的z-index的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆