Li

Delete

Are you sure you want to delete this?

ProgrammingModel


Date
20211123
Target
C_054
Title
CSS units for font-size: px | em | rem / https://nekocalc.com/px-to-rem-converter
Contents
CSS에서 글자, font-size를 정확하게 이해하기 위해 단위를 먼저 이해하여야 한다. 그것은 px, em, rem이다. rem rem values are relative to the root html element, not to the parent element. em is by parent element px를 쓰면 불편한 이유 px Pixels are the easiest measurement to use. But there is a catch. Let’s say we used pixels throughout our website and we managed the media queries too. What if a user changes the default font-size of browser (or device)? Your header’s font-size (say 20px) will remain 20 px. Hence user’s font preferences won’t be reflected. Which is not a good user experience. So, pixels may be good at spacing and layout but are not good fit for font-size. ems and rems are at rescue. CSS units for font-size: px | em | rem https://medium.com/@dixita0607/css-units-for-font-size-px-em-rem-79f7e592bb97 Pixel to REM, https://nekocalc.com/px-to-rem-converter https://www.croydon.gov.uk/design-and-content-guidelines/resources/pixel-rem-conversion-table