<分区>
我显示的按钮如下:
.button {
height: 44px;
background-color: #FF0000;
display: block;
margin-top: 20px;
margin-left: 20px;
margin-right: 20px;
border-radius: 5px;
border-top: none !important;
line-height: 42px !important;
}
<div class="button">Text</div>
一切正常,除了在移动设备上查看时:
Android 8.1.0 AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.132 Mobile Safari/537.36
文本显示在 div 内部比以下情况高大约 2 个像素:
Android 9 AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.73 Mobile Safari/537.36
为什么会这样?它是如何修复的?