Created
April 26, 2017 14:40
-
-
Save amowu/7e54f5dfaa86323456a158b945b7f12c to your computer and use it in GitHub Desktop.
响应式的字体大小的计算公式
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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