Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

css responsive font size

body {
  // font grows 1px for every 100px of viewport width
  font-size: calc(16px + 1vw);
  // leading grows along with font,
  // with an additional 0.1em + 0.5px per 100px of the viewport
  line-height: calc(1.1em + 0.5vw);
}
Source by css-tricks.com #
 
PREVIOUS NEXT
Tagged: #css #responsive #font #size
ADD COMMENT
Topic
Name
9+1 =