This content originally appeared on DEV Community and was authored by Albert Chang
Rem
Root element's font size. In other words, it is the font size of the html element.
If no font size is specified on the html element, it is determined by the browser's font size setting which has a default of 16px.
Em
Current element's font size. For example, let's say you have a button with a font size of 20px. If you define the padding to be 2em, the size of the padding will be 40px.
This content originally appeared on DEV Community and was authored by Albert Chang
Albert Chang | Sciencx (2021-08-07T23:09:23+00:00) Super Short Introduction to Rem & Em. Retrieved from https://www.scien.cx/2021/08/07/super-short-introduction-to-rem-em/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.