1. Use rem as unit
html { font-size: 100px; }
@media(min-width: 320px) { html { font-size: 100px; } }
@media(min-width: 360px) { html { font-size: 112.5px; } }
@media(min-width: 400px) { html { font-size: 125px; } }
@media(min-width: 640px) { html { font-size: 200px; } }
Set a font size of 100px for mobile phones; for 320px mobile phones, the matching is 100px,
Other mobile phones are matched in equal proportions; therefore, if there are many pixels in the design draft, then when converting to rem, rem = pixels in the design draft/100;
2. Disable the darkening of the background of labels such as a, button, input, optgroup, select, textarea
When using the a tag as a button or text link on the mobile terminal, a "dark" background will appear when clicking the button, such as the following code:
<a href="">button1</a>
<input type="button" value="Submit"/>
Statement:
All resources on this website are contributed and published by netizens, or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this website are for learning and reference only. Please do not use them for commercial purposes, otherwise you will be responsible for all consequences incurred! If there is any infringement, please contact us to delete and remove it. Contact information: admin@php.cn