Skip to main content

Command Palette

Search for a command to run...

CSS Units and Cursor

Published
•1 min read•View as Markdown
CSS Units and Cursor

CSS Units

👉 CSS has several different units for expressing a length.

👉 Many CSS properties take "length" values, such as width, margin, padding, font-size, etc

Absolute Lengths

The absolute length units are fixed and a length expressed in any of these will appear as exactly that size.

Example👇

Relative Lengths

Relative length units specify a length relative to another length property. Relative length units scale better between different rendering mediums.

Example of vh and %👇🏻

Concept of emphemeral unit ( em )👇🏻

Example emphemeral unit (em)👇🏻

Concept of rem unit👇

rem stands for "root em"

Example of (rem)👇🏻


CSS Cursor Property

CSS can generate a bunch of different mouse cursor:

Example👇🏻


image.png

\> Download our HTML & CSS Visual Treat! ebook Here: Click here