📅  最后修改于: 2022-03-11 14:47:39.127000             🧑  作者: Mango
There are several ways to achieve this.
*CSS supports dimensions that are relative to viewport.
3.2vw = 3.2% of width of viewport
3.2vh = 3.2% of height of viewport
3.2vmin = Smaller of 3.2vw or 3.2vh
3.2vmax = Bigger of 3.2vw or 3.2vh
body {
font-size: 3.2vw;
}
see http://css-tricks.com/viewport-sized-typography/
and also look at http://caniuse.com/viewport-units