Show Menu
Cheatography

CSS UNITS CHEATSHEET Keyboard Shortcuts by

CSS UNITS CHEATSHEET

CSS Units Cheatsheet

px
:
Absolute Length
rem
:
Relative to the font-size of the root element
em
:
Relative to the font-size of the element
%
:
Relative to the parent element
vw
:
Relative to the viewport's width,
1vw = 1% * viewport's width
vh
:
Relative to the viewport's height,
1vh = 1% * viewport's height
vmin
:
Relative to the viewport's smaller dimension,
1vmin = min(1vh, 1vw)
vmax
:
Relative to the viewport's larger dimension,
1vmax = max(1vh, 1vw)
ch
:
Relative to the width of the glyph "­0" of the element's font
in
:
Inches
1in=2.54cm = 96px
pc
:
Picas
1pc=1in / 6 = 16px
pt
:
Points
1pt = 1in /72 = 1.333px (approx.)
cm
:
Centim­eters
1cm= 1in / 2.54 = 37.8px (approx.)
mm
:
Millim­eters
mm = 1cm / 10 = 3.78px (approx.)
rahilkasimi@gmail.com
               
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

            Bootstrap Glyphicons Cheat Sheet by James Croft
          Five ways to center DIV element in CSS Cheat Sheet

          More Cheat Sheets by rahilkasimi

          CSS Selectors Cheatsheet Cheat Sheet
          Five ways to center DIV element in CSS Cheat Sheet
          SQL Cheat Sheet