<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)
Solved, using
button
as a container will not cause this problemLower 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)