鍍金池/ 問(wèn)答/HTML5  HTML/ css:2個(gè)absolute定位的相鄰的div,為什么在安卓下中間有1px間距?

css:2個(gè)absolute定位的相鄰的div,為什么在安卓下中間有1px間距?

圖片描述圖片描述

容器高 120px
2個(gè)半圓div分別高 60px,絕對(duì)定位,為什么在安卓下中間會(huì)有 1px 的間距呢?
背景圖的高度是60px,已經(jīng)確認(rèn)過(guò)不是背景圖的問(wèn)題,改成純色背景也一樣。

測(cè)試:
ios 微信,safari 正常
android 微信、UC瀏覽器均不正常

代碼如下:

html

<div class="container">
    <div class="top"></div>
    <div class="bottom"></div>
</div>

css

.container {
    position: relative;
    width: 120px;
    height: 120px;
    .top,
    .bottom {
        position: absolute;
        left: 50%;
        margin-left: -60px;
        width: 120px;
        height: 60px;
    }
    .top {
        top: 0;
        background: url(top.png) no-repeat center 0;
        // background: #000;
    }
    .bottom {
        bottom: 0; // 改為 top: 60px 也一樣
        background: url(bottom.png) no-repeat center 0;
        // background: #000;
    }
}
回答
編輯回答
毀了心

測(cè)試地址 http://123.56.16.33/element/1...

我在手機(jī)上沒有復(fù)現(xiàn)你的問(wèn)題。margin-left: -59px;可以看出來(lái)背景左邊的1px的黑色底邊

2018年7月13日 11:21