最近看苏宁app的源码说是泄漏了,逐看了下他们的网站M站,发现有段css写的看不太明白,望大婶们指点:
html {font-size: 50px}
body {font-size: 24px}
@media screen and(min-width: 320px) {
html { font-size: 21.33px}
body { font-size: 12px}
}
@media screen and(min-width: 360px) {
html { font-size: 24px }
body { font-size: 12px }
}
@media screen and(min-width: 375px) {
html { font-size: 25px }
body { font-size: 12px }
}
@media screen and(min-width: 384px) {
html { font-size: 25.6px }
body { font-size: 14px }
}
@media screen and(min-width: 400px) {
html { font-size: 26.67px }
body { font-size: 14px }
}
如上,那些body跟html的字体比例是如何计算而来的?
迷茫2017-04-17 11:25:01
Using media queries in css3, when the screen width is 320px, changing the font-size in html and body is the same as below.
@media screen media inquiries
However, Suning’s work is quite meticulous
天蓬老师2017-04-17 11:25:01
The display effect is independently set according to the page resolution, and there are no special calculation rules.