css - 安卓内嵌H5,padding边距上下不一致
黄舟
黄舟 2017-04-17 18:00:51
0
5
1162

<span>管理员</span>
    border-radius: .07rem;
    padding: .05rem .1rem;
    color: #fff;
    background-color: #EE3120;

PC上是正常的,安卓webview里明显上下边距不一致,除了修改padding top和bottom的值,还有别的解决办法吗

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(5)
迷茫

Solved, using button as a container will not cause this problem

迷茫

Lower versions of Android are not well supported. . .

大家讲道理

Remove padding and directly use line-height to set the span height.

洪涛

<span style="height: 30px;line-height: 30px;display:inline-block;padding:0px 10px;border-radius: 5px;color: #ffffff;background-color: #EE3120;">Try Give it a try</span>
It’s very simple, I wrote it together, it looks like this on the phone

左手右手慢动作

1, reset the vertical alignment of the font; vertical-align: baseline;
2, turn off font optimization; -webkit-text-size-adjust: 100%;
3, set the default font of the device; for example: font-family: sans -serif;

This is basically OK; (except for Android with custom font roms like Meizu)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template