Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Css :: text indent css 
Css :: center ul 
Css :: background-repeat 
Css :: css background darker 
Css :: outline radius css 
Css :: lower brightness of backgroung css 
Css :: gap css flex 
Css :: css background 
Css :: div color overlay css 
Css :: how to change image based on screen size 
Css :: add shadow to background image css 
Css :: glassmorphism background in css 
Css :: align-self in css 
Css :: css move animation 
Css :: maxheight media query 
Css :: transition timing function css 
Css :: how to move anything left in css 
Css :: How do you get a 2nd last child in CSS? 
Css :: how to add css using nativeelement in angular 
Css :: css background image cut off 
Css :: make image background of div 
Css :: how to center with position fixed 
Css :: scroll css 
Css :: easy ways to implement dark mode html css 
Css :: wkhtmltopdf remove thead repeating 
Css :: disable checkbox click event 
Css :: drop down menu html css 
Css :: how to horizontally center header at the top of page with flexbox css 
Css :: bootstrap modal overflow 
Css :: box sizing ftw 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =