์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
- Absolute
- AGI
- ai
- AI agents
- AI engineer
- AI researcher
- ajax
- algorithm
- Algorithms
- aliases
- Array ๊ฐ์ฒด
- ASI
- bayes' theorem
- Bit
- Blur
- BOM
- bootstrap
- canva
- challenges
- ChatGPT
- Today
- In Total
A Joyful AI Research Journey๐ณ๐
230203 CSS after::, before:: ์ฌ์ฉ๋ฒ ๋ณธ๋ฌธ
230203 CSS after::, before:: ์ฌ์ฉ๋ฒ
yjyuwisely 2023. 3. 29. 21:34::after (:after)
์ฐธ๊ณ : https://developer.mozilla.org/ko/docs/Web/CSS/::after
CSS์์, ::after ๋ ์ ํํ ์์์ ๋งจ ๋ง์ง๋ง ์์์ผ๋ก ์์ฌ ์์๋ฅผ ํ๋ ์์ฑํ๋ค. ๋ณดํต content ์์ฑ๊ณผ ํจ๊ป ์ง์ง์ด, ์์์ ์ฅ์์ฉ ์ฝํ
์ธ ๋ฅผ ์ถ๊ฐํ ๋ ์ฌ์ฉํ๋ค. ๊ธฐ๋ณธ๊ฐ์ ์ธ๋ผ์ธ์ด๋ค.
(CSS ์์ฌ ์์(๊ฐ์ ์์)๋ ์ ํ์์ ์ถ๊ฐํ๋ ํค์๋๋ก, ์ ํํ ์์์ ์ผ๋ถ๋ถ์๋ง ์คํ์ผ์ ์
ํ ์ ์๋ค.)
/* ๋งํฌ ๋ค์ ํ์ดํ ์ถ๊ฐ */
a::after {
content: "→";
}
HTML
<p class="boring-text">์ ๋นํ ํ๋ฒํ๊ณ ์ฌ์ฌํ ๊ธ์
๋๋ค.</p>
<p>์ง๋ฃจํ์ง๋ ํฅ๋ฏธ์ง์งํ์ง๋ ์์ ๊ธ์
๋๋ค.</p>
<p class="exciting-text">MDN ๊ธฐ์ฌ๋ ์ฝ๊ณ ์ฌ๋ฐ์ต๋๋ค.</p>
CSS
.exciting-text::after {
content: " <- ํฅ๋ฏธ์ง์ง!";
color: green;
}
.boring-text::after {
content: " <- ๋จผ์งํํ";
color: red;
}
๊ฒฐ๊ณผ)
CSS์์, ::before ๋ ์ ํํ ์์์ ์ฒซ ์์์ผ๋ก ์์ฌ ์์๋ฅผ ํ๋ ์์ฑํ๋ค. ๋ณดํต content ์์ฑ๊ณผ ํจ๊ป ์ง์ง์ด, ์์์ ์ฅ์์ฉ ์ฝํ ์ธ ๋ฅผ ์ถ๊ฐํ ๋ ์ฌ์ฉํ๋ค. ๊ธฐ๋ณธ๊ฐ์ ์ธ๋ผ์ธ์ด๋ค.
<q>Some quotes,</q> he said, <q>are better than none.</q>
q::before {
content: "«";
color: blue;
}
q::after {
content: "»";
color: red;
}
์ฐธ๊ณ : https://developer.mozilla.org/ko/docs/Web/CSS/::before