在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML5  Python  HTML/ iphone X 兩個(gè)div 中間縫隙怎么去除

iphone X 兩個(gè)div 中間縫隙怎么去除

<style>
body,div,p,ul,ol,li,img{
    margin: 0;
    padding: 0; 
}
.bgimg{
    position: relative;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}
</style>
    <div class="bgimg" style="height: 1.77rem; background-image: url('https://wicdn.xiaohongchun.com/xhc-plat/1516241484691_dmWHtZXP2c.jpg')"></div>

    <!-- 新年好禮 -->
    <div class="bgimg single" style="height: 4.26rem; background-image: url('https://wicdn.xiaohongchun.com/xhc-plat/1516241484691_edN6k2DY5w.jpg')">
        <span class="goodsItem" pid="13105"></span>
    </div>

在其他設(shè)備沒有問題,但是在iphone X 上兩個(gè)div 中間會(huì)有一條白線,試過font-size:0、padding: 0、 margin:0, 但是都沒有效果

回答
編輯回答
安淺陌

拼縫位置靠上點(diǎn),body加個(gè)純色背景呢?
感覺像是小數(shù)像素取整的問題……

2017年5月31日 08:37
編輯回答
櫻花霓

是小數(shù)點(diǎn)問題,需要單獨(dú)設(shè)定樣式

/* 適配iphone X */
@media only screen and (device-width:375px) and (-webkit-device-pixel-ratio: 3) {
    .bg1{
        height: 1.76rem !important;
    }
}
2017年11月26日 19:10
編輯回答
憶當(dāng)年

盒模型看看呀

2018年6月2日 20:44
編輯回答
撿肥皂

這個(gè)問題其實(shí)是圖片與圖片有字體 默認(rèn)為1像素的高度

img外層的盒子 {
 font-size:0 
}
2018年8月12日 19:52