为了账号安全,请及时绑定邮箱和手机立即绑定

一个没有层叠上下文的元素如何比有的元素 z-index 更大?

一个没有层叠上下文的元素如何比有的元素 z-index 更大?

qq_笑_17 2018-09-12 10:10:25
          <thead id="fixed_table_title" class="table-head">                 <tr>                      <th>Prescriber</th>                 </tr>               </thead>                                <tbody id="fixed-body" class="table-body" style="transition: -webkit-transform 0s ease-out; transform: translate3d(0px, -24.808px, 0px);">                 <tr>                     <td>商品1</td>                 </tr>               <tr>                   <td>商品2</td>               </tr>               <tr>                   <td>商品3</td>               </tr>               <tr>                   <td>商品4</td>               </tr>                  </tbody>                              #fixed_table_title{       position: relative !important;        z-index: 10000 !important;   }   #fixed-body{           z-index: 100 !important;position: relative !important;   }                  试图给 t-head 添加 transform 属性或其他的导致其产生 层叠上下文的属性,发现改变 t-body transform Y轴属性移动其时 t-head 还是会被 t-body覆盖。                                              
查看完整描述

1 回答

?
Qyouu

TA贡献1786条经验 获得超11个赞

同一层级下,根据由顺序和z-index值大小决定;不同层级下,由父级顺序和z-index决定。


查看完整回答
反对 回复 2018-10-06
  • 1 回答
  • 0 关注
  • 576 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

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

帮助反馈 APP下载

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

公众号

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