Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 1
Em or rem?
What is the difference between Em and Rem & which is the best choice?
3 Respostas
+ 2
<div style="font-size:1.5em">
Some
<div style="font-size:1.5em">
Text
</div>
</div>
try it, and then change to rem
+ 2
When usingĀ emĀ units, the pixel value you end up with is a multiplication of the font size on the element being styled.
When usingĀ remĀ units, the pixel size they translate to depends on the font size of the root element of the page, i.e. theĀ HTML element. That root font size is multiplied by whatever number youāre using with yourĀ remĀ unit.
0
Hi