未应用z

编程入门 行业动态 更新时间:2024-10-22 23:15:22
本文介绍了未应用z-index的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

首先,请允许我说我是CSS的新手.还有很多东西要学习!我正在使用 https:上的网站://web.archive/web/20130709112702/www.thesweet-spot/test77

First off, please let me say I'm pretty new to CSS. Still lots to learn! I'm working on a site at web.archive/web/20130709112702/www.thesweet-spot/test77

一切正常,除了将主要内容框放置在固定位置徽标下方而不是放置在固定位置徽标上方的情况下,即使徽标上的z索引低于内容框中的z索引也是如此.你的天才能告诉我什么?

Everything is working great, EXCEPT that the main content box is being placed under the fixed-position logo instead of over it, even though the z-index on the logo is lower than the z-index on the content box. What can you geniuses tell me?

推荐答案

实际上有两个原因:

  • 其父级设置为在徽标后面中显示.应用于该父元素内的元素的任何z索引将仅应用于该父元素内的其他元素.父元素中的所有元素都将进行相应的堆叠,然后按照其堆叠顺序指定的方式将整个元素放置在徽标后面.

  • Its parent is set to show up behind the logo. Any z-index applied to elements within that parent element will only apply to other elements within that parent. All the elements within the parent will be stacked accordingly, then that entire element will be put behind the logo as specified by its stack order.

    z索引仅适用于位置为绝对,固定或相对的元素.它不适用于具有静态位置的元素.

    A z-index only applies to elements with position of absolute, fixed, or relative. It does not apply to elements with static position.

  • 更多推荐

    未应用z

    本文发布于:2023-06-11 17:28:35,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/639756.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!