请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

请问老师,singer-detail组件为何要设置 z-index

请问为何 singer-detail 组件这里需要设置 z-index,而且在 music-list 中也有应用

<style lang="scss" scoped>
  .singer-detail {
    position: fixed;
    z-index: 10; // ⬅️这句代码
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: $color-background;
  }
</style>

正在回答 回答被采纳积分+3

1回答

ustbhuangyi 2022-06-13 17:47:00

z-index 用来改变层级

0 回复 有任何疑惑可以回复我~
  • 提问者 Madao54 #1
    我没理清楚为何要给 singer-detail 设置层级,我尝试注释这个属性。没有发生变化。希望老师点明一下
    回复 有任何疑惑可以回复我~ 2022-06-14 19:20:06
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号