Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

change font size according to screen css

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
 
PREVIOUS NEXT
Tagged: #change #font #size #screen #css
ADD COMMENT
Topic
Name
5+7 =