前言:这是笔者第一次写博客,主要是学习之后自己的理解。如果有错误或者疑问的地方,请大家指正,我会持续更新!
z-index属性描述元素的堆叠顺序(层级),意思是 A 元素可以覆盖 B 元素,但是 B 元素并没有消失display:none,只是被盖住了。 z-index属性可以为负值,默认为auto(可以理解为0),值最大的处于最上层.
z-index
display:none
auto