и посмотреть медиа
Frontend | Interview questions
и посмотреть медиа
Interview questions frontend randomly.
Interview questions frontend randomly.
AI bot for text-to-speech and voice cloning in Telegram. Create audio using neural network quickly and easily.
Collection of frontend questions: JavaScript, frameworks, performance, accessibility. Detailed answers will help confidently pass interviews.
🤔 Чем em отличается от rem? 🟠Как работает `em`? em зависит от размера шрифта родителя (font-size). .parent { font-size: 20px; } .child { font-size: 1.5em; /* 1.5 * 20px = 30px */ } Но если .child вложен в .parent, то он наследует font-size, а его em вычисляется относительно родителя. .parent { font-size: 20px; } .child { font-size: 1.5em; /* 30px */ } .grandchild { font-size: 2em; /* 2 * 30px = 60px */ } 🟠Как работает `rem`? rem всегда зависит от font-size у . html { font-size: 16px; } .container { font-size: 2rem; /* 2 * 16px = 32px */ } 🟠Когда использовать `em`, а когда `rem`? Используйте rem, если нужно, чтобы шрифты и размеры были предсказуемыми Используйте em, если хотите, чтобы элементы зависели от родителя Ставь 👍 и забирай 📚 Базу знаний
Открыть канал и посмотреть медиаOnly registered users can share their opinion.
Be the first to share your impression of this resource!