Skip to content

Instantly share code, notes, and snippets.

@amowu
Created April 26, 2017 14:40
Show Gist options
  • Save amowu/7e54f5dfaa86323456a158b945b7f12c to your computer and use it in GitHub Desktop.
Save amowu/7e54f5dfaa86323456a158b945b7f12c to your computer and use it in GitHub Desktop.
响应式的字体大小的计算公式
$min-font-size: 16px;
$max-font-size: 24px;
$min-screen-size: 400px;
$max-screen-size: 800px;
font-size: calc($min-font-size + ($max-font-size - $min-font-size) * (100vw - $min-screen-size) / ($max-screen-size - $min-screen-size));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment