在小米手機(jī)自帶的瀏覽器中(版本V8.6.5), 我的布局代碼是這樣的, header 是fixed定位,content容器里面包含有圖片。但是當(dāng)有圖片的時(shí)候,fixed定位的header就無法正常顯示。注意:如果復(fù)現(xiàn)不了,請?jiān)谖臋n底部執(zhí)行一段js代碼,可保證必現(xiàn)已經(jīng)試了以下方法:圖片用背景圖的方式,也會(huì)導(dǎo)致fixed元素?zé)o法顯示調(diào)高h(yuǎn)eader的z-index沒有效果把圖片挪到.page 容器之外,則能正常顯示,但是這樣會(huì)影響我的布局,不可用有人遇到類似的問題嗎?什么原因?怎么解決的.page {position: relative; height: 100%; width: 100%; padding-top: 44px;}.header-fixed {position:fixed; background: #ccc; width: 100%; height: 44px; top: 0;}.content img{width: 100px;}<div class="page"> <header class="header-fixed">header</header> <section class="content"> <img src="https://dimg04.c-ctrip.com/images/30080f0000007b78e6D63_C_500_280.jpg"> </section></div>
小米瀏覽器中,圖片導(dǎo)致fixed定位的元素?zé)o法顯示
慕容3067478
2018-11-14 13:14:34