Warning: preg_grep(): Compilation failed: quantifier does not follow a repeatable item at offset 27 in /var/www/tg-me/post.php on line 75
Frontend | Вопросы собесов | Telegram Webview: easy_javascript_ru/1454 -
Telegram Group & Telegram Channel
🤔 Чем 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>.
html {
font-size: 16px;
}

.container {
font-size: 2rem; /* 2 * 16px = 32px */
}


🟠Когда использовать `em`, а когда `rem`?
Используйте rem, если нужно, чтобы шрифты и размеры были предсказуемыми
Используйте em, если хотите, чтобы элементы зависели от родителя

Ставь 👍 и забирай 📚 Базу знаний
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/easy_javascript_ru/1454
Create:
Last Update:

🤔 Чем 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>.
html {
font-size: 16px;
}

.container {
font-size: 2rem; /* 2 * 16px = 32px */
}


🟠Когда использовать `em`, а когда `rem`?
Используйте rem, если нужно, чтобы шрифты и размеры были предсказуемыми
Используйте em, если хотите, чтобы элементы зависели от родителя

Ставь 👍 и забирай 📚 Базу знаний

BY Frontend | Вопросы собесов


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/easy_javascript_ru/1454

View MORE
Open in Telegram


Frontend | Вопросы собесов Telegram | DID YOU KNOW?

Date: |

Telegram Be The Next Best SPAC

I have no inside knowledge of a potential stock listing of the popular anti-Whatsapp messaging app, Telegram. But I know this much, judging by most people I talk to, especially crypto investors, if Telegram ever went public, people would gobble it up. I know I would. I’m waiting for it. So is Sergei Sergienko, who claims he owns $800,000 of Telegram’s pre-initial coin offering (ICO) tokens. “If Telegram does a SPAC IPO, there would be demand for this issue. It would probably outstrip the interest we saw during the ICO. Why? Because as of right now Telegram looks like a liberal application that can accept anyone - right after WhatsApp and others have turn on the censorship,” he says.

How to Buy Bitcoin?

Most people buy Bitcoin via exchanges, such as Coinbase. Exchanges allow you to buy, sell and hold cryptocurrency, and setting up an account is similar to opening a brokerage account—you’ll need to verify your identity and provide some kind of funding source, such as a bank account or debit card. Major exchanges include Coinbase, Kraken, and Gemini. You can also buy Bitcoin at a broker like Robinhood. Regardless of where you buy your Bitcoin, you’ll need a digital wallet in which to store it. This might be what’s called a hot wallet or a cold wallet. A hot wallet (also called an online wallet) is stored by an exchange or a provider in the cloud. Providers of online wallets include Exodus, Electrum and Mycelium. A cold wallet (or mobile wallet) is an offline device used to store Bitcoin and is not connected to the Internet. Some mobile wallet options include Trezor and Ledger.

Frontend | Вопросы собесов from us


Telegram Frontend | Вопросы собесов
FROM USA