์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
- ์ฝ๋ฉ์ผ๊ธฐ
- canvas
- canvas image
- HTML
- tanstack-query
- javascript
- next.js
- axios-mock-adapte
- ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ
- ์น ๋ธ๋ผ์ฐ์ ๋ ๋๋ง
- tailwindcss
- ๋ ธ๋ง๋์ฝ๋
- ๋ ธ๋ง๋ ์ฝ๋
- ๋ฐ๋๋ผ JS๋ก ํฌ๋กฌ ์ฑ ๋ง๋ค๊ธฐ
- ์ํ์ฝ๋ฉ
- ์น ๋ธ๋ผ์ฐ์ ๊ตฌ์กฐ
- clone coding
- JAVA Script
- HTML ํ์ผ๊ตฌ์กฐ
- negative margin
- ํ๋ก ํธ์๋
- canvas js
- queryprovider
- JS
- react
- ์ฝ๋ฉ๋ ํ
- CSS
- ๋ฐ๋๋ผ JS๋ก ๊ทธ๋ฆผํ ๋ง๋ค๊ธฐ
- typescript
- jest
- Today
- Total
Coding Archive
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(4) ๋ณธ๋ฌธ
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(4)
์ฝ๋ฑ์ด 2022. 4. 21. 23:47CLONING TIME
19. Chats Screen part One
far = ์์ด ๋น ์์ด์ฝ
fas = ์์ด ์ฐฌ ์์ด์ฝ
ex)<i class="far fa-comment fa-2x">
์ ์ ๋ง๋ค์ด ๋์๋ ์ฝ๋๋ค์ ๋ณต๋ถ ํ๊ณ ์์ ํด์ ์์ฑ
20. Chats Screen part Two
margin-bottom: 15px; ์ ํ๋ฉด friends ์ฐฝ์์๋ ์ ์ฉ๋๋๋ฐ,
friends๋ ์๋๋๋ก ๋๋ฆฌ๊ณ ์ถ์ผ๋ฉด friends.css์ #friends-display-link์ margin-top: -15px; ๋ฅผ ์ถ๊ฐํด์ค๋ค.
๋ฐ๋ณต๋๋ ์์๋ components์ ๋ฌถ๊ธฐ!
--> ๊ฒน์น๋ ํ๊ทธ๋ค์ ๋ฌถ๊ณ (๊ณตํต๋๋ ๊ฒ๋ค), ๋๋จธ์ง๋ ๊ฐ์ css์ ์จ์ค๋ค.
flex์ ์ํฅ์ ๋ฐ๊ณ ์ถ์ง ์์ ๋ ์๋ค์ div๋ฅผ ํ๋ ๋ ์์์ ๋ถ๋ชจ-์์๊ด๊ณ๋ฅผ ๋๊ณ ๋ถ๋ชจ-์์ ๊ด๊ณ๋ฅผ ๋ง๋ ๋ค.
class css์ค์ ์ last-child ์กฐ๊ฑด์ด ๋ถ์ด์๋๋ฐ, ํด๋น flex๋ฅผ ์ ์ฉํ๊ณ ์ถ์ง ์์ ์์๊ฐ last-child๋ผ๋ฉด,
๊ทธ ์์๋ฅผ "div"๋ก ์์ฐ๋ฉด "๋ถ๋ชจ-์์ ๊ด๊ณ"๊ฐ ์๋ "๋ถ๋ชจ-์์ ๊ด๊ณ"์ด๋ฏ๋ก => Flex์ ์ํฅ๊ถ์์ ๋ฒ์ด๋ ์ ์๋ค.
+) issue
1) component__column:last-child์ flex๋ฅผ ์ฃผ๊ธฐ ์ ์๋ block ์์ด๋ margin์ด ์ ์๊ฒผ๋๋ฐ, flex ์ฃผ๊ณ ๋๋ block ์์ด๋ margin์ด ์๊ฒผ๋ค.
2) ๊ทธ๋ฆฌ๊ณ flex๋ฅผ ์ฃผ๊ธฐ ์ ์๋ span์ margin์ ์ฃผ๋ฉด ์ฌ๋ฐฑ์ด ์๊ฒจ์ผ ํ๋ ๊ฑฐ ์๋๊ฐ??
→
1) ๊ทธ๋ฐ๋ฐ ๋ถ๋ชจ ์์์ display:flex๋ฅผ ํ๋ฉด ์์ ์์๋ flex item์ด ๋๋ค.
์ด๋ด ๊ฒฝ์ฐ inline element๊ฐ ์๋๋ผ flex element์ฌ์ ๋ง์ง์ด ์ ์ฉ์ด ๋๋ ๊ฒ ๊ฐ๋ค.
2) span inline element์ฌ์ margin์ด ์ ์ฉ๋์ง ์๋๋ค. ๊ทธ๋์ flex๋ฅผ ์ค์ block์ผ๋ก ๋ง๋ค์ด์ค ๊ฒ์ด๋ค.
21. Find Screen Part One
.class๋ช * n(๊ฐ์)>span ⇒ n๋งํผ span์ ๊ฐ์ง div class๋ฅผ ์์ฑ
.find-icons__icon*4>span
row๋ ์์ ์ค๋ ๊ฒ, column์ ๋ค์ ์ค์ ์ค๋ ๊ฒ.
์์ด์ฝ ์ด๋ฏธ์ง์ ํฌ๊ธฐ ๋ํ, CSS์์ .class๋ช i์ font-size๋ก ์ผ๊ด ์กฐ์ ํ ์ ์๋ค.
22. Find Screen Part Two
๊ฐ์ ์ฝ๋๊ฐ ๋ฐ๋ณต๋๋ค๋ฉด ๋ณ์๋ก ๋ง๋ค์ด์ ์ฌ์ฉํ์ฌ ๋๊ฐ์ ์ฝ๋ ๋ฐ๋ณต์ ์ค์ธ๋ค.
:root {
--yellow: #fae100;
--horizontal-space: 25px;
--main-border: 1px solid rgba(0, 0, 0, 0.2);
--gray: rgba(0, 0, 0, 0.5);
}
23. Find Screen Part Three
HTML ์ฝ๋์์ ๋๋ฌธ์๋ฅผ ๋ํ๋ด๋ ค๊ณ ํด๋, ์ฐ์ ์๋ฌธ์๋ก๋ง ์์ฑํ๋ค.
๋๋ฌธ์๋ ๋์์ธ์ ์ธ ์์์ด๊ธฐ ๋๋ฌธ์, CSS ํ์ผ์์ ์์ฑํด์ค์ผ ํ๋ค. (ํ์๋ ์๋)
text-transform: uppercase; → ๋๋ฌธ์๋ก ๋ง๋๋ ์ฝ๋
.open-post__members .devider { }๋ผ๊ณ ํ๋ฉด open-post__members ์์ ์๋ devider์๋ง ์ ์ฉํ ์ ์๋ค๋ ์๋ฏธ์ด๋ค.
"open-post"๋ถ๋ถ ๊ฐ์ div, span, h ํ๊ทธ ๊ฐ์ธ๋์ง ๊ธฐ์ค์ ๋ชจ๋ฅด๊ฒ ๋ค. ์์ง ์ต์ํ์ง ์์์ ๊ทธ๋ฐ๊ฐ? ๋ํํ ๋ ์์ง ๋ช ํํ ๊ธฐ์ค์ด ๋ณด์ด์ง ์๋๋ค.ใ ใ ๊ตณ์ด ์ฃ๋ค ์ด๋ฆ์ ๋ถ์ด๋ ์ด์ ๋(์ ๋ชฉ์ ์จ๋๊ณ )? -> css ํ ๋ ํธํ๊ฒ ํ๋ ค๊ณ ? ํ ....
24. Find Screen Part Four
justify-content: space-between; ๊ณผ align-items: center; ๋ ํญ์ ์์ฃผ ์ฐ์ด๋ ์กฐํฉ์ด๋ค.
์ฌ์ง ์์ span ์ฌ๋ฆฌ๊ธฐ ๋ฑ, ์๋์ ์์น ์ ํด์ฃผ๊ณ ์ถ์ ๋๋, relative-father and absolute-child!! ๊ธฐ์ตํ๊ธฐ!
+) issue
position: absoulte๋ฅผ ์คฌ๋ค๊ณ ์ open-post__heart-counter์ ํฌ๊ธฐ๊น์ง ์์์ง ์ด์ (♥326์ ๊ฐ์ธ๋ ๋ฐ์ค๊ฐ ์์์ง ์ด์ )
→
absolute looses the sizing if we don't specify 'width' and 'height’
='๋๋น'์ '๋์ด'๋ฅผ ์ง์ ํ์ง ์์ผ๋ฉด ์ ๋์ ์ผ๋ก ํฌ๊ธฐ ์กฐ์ ์ด ์ค์ด๋ ๋ค.
position: absolute ํ๊ทธ ์ ์ฉํ๊ธฐ ์ ์ ์ง์ ๋ ๋์ด๊ฐ(height)๊ณผ ๋๋น ๊ฐ(width)์ ์ ์ฃผ๊ณ padding๊ฐ๋ง ์ฃผ๊ฒ ๋๋๊น absoluteํ๊ทธ ์ ์ฉ ํ ์ง์ ๋ padding๊ฐ๋งํผ๋ง ์ปค์ง ๊ฒ ๊ฐ๋ค.
absoluteํ๊ทธ๋ฅผ ์ฌ์ฉํ ๊ฒฝ์ฐ ํด๋น ์ฝํ ์ธ ํฌ๊ธฐ๋งํผ๋ง ๊ฐ์ธ๋ ๊ฒ ๊ฐ๋ค.
25. More Screen part One
๋ฐ๋ณต๋๋ ๋ถ๋ถ๋ค์ icon-row ์ปดํฌ๋ํธ ์์ฑํ์ฌ ์ ๋ฆฌํ๋ค.
find์์ ๋ง๋ ์์ด์ฝ ๋ฐฐ์ด์ด more์์๋ ์ฐ์ด๊ธฐ ๋๋ฌธ์ find.css ์์ ์๋ find-icon์ css๋ฅผ icon-row๋ผ๋ component๋ก ๋ง๋ค์ด์ฃผ๊ณ , find.html ์์ ํด๋์ค ๋ช ์ ๋ฐ๊ฟ์ค๋ค.
์ด๋ ๊ฒ ํ๋ฉด ๋ ์คํฌ๋ฆฐ์์ ์ปดํฌ๋ํธ๋ฅผ ์ด์ฉํ ์ ์๋ค.
.icon-row {
display: flex;
justify-content: space-between;
padding-bottom: 25px;
}
.icon-row__icon {
display: flex;
flex-direction: column;
align-items: center;
}
.icon-row__icon i {
font-size: 35px;
}
.icon-row__icon span {
margin-top: 18px;
}
์ด๋ ํ ์คํฌ๋ฆฐ์์๋ง ๋ํ ์ผํ ๋ถ๋ถ์ ์์ ํ๊ณ ์ถ์ผ๋ฉด, more-screen์ด๋ผ๋ class ์ด๋ฆ์ ๋ ๋ถ์ฌ์, more.css์์ ์์ ํด์ฃผ๋ฉด ๋๋ค! → ์์ ํ ๊ฑฐ์ ํด๋์ค๋ฅผ ํ๋ ๋ ๋ถ์ฌ์ ๊ทธ๊ฒ์ ์ง์นญํด ์์ !!! → ๋งค์ฐ ๊ฐ๋จ!!
26. More Screen part Two
์์๋๋ก ์ ๋ ฌ๋๊ธธ ๋ฐ๋ ๋๋ flex-direction: column; ๋ฅผ ์ฌ์ฉํ๋ค.
<div class="more-suggestions__icons">
<div class="more-suggestions__icon">
<div class="more-suggestions__icon-image">
<i class="fas fa-quote-right"></i>
</div>
<span *class*="more-suggestions__icon-text">Kokoa Story</span>
</div>
์ฃ๋ค div ํ๊ทธ๋ก ๊ฐ์ผ ๊ธฐ์ค์ ๋ชจ๋ฅด๊ฒ ๋ค. <div class="more-suggestions__icon-image"> ๊ฐ์ ๊ฒฝ์ฐ๋ span๋ ์๊ด์์ง ์์๊น?
์ ์๋ํ๋ฉด ๋ฟ๋ฏํ๋ฐ ์์ง์ ํท๊ฐ๋ฆฌ๋ ๊ฒ ๋๋ฌด ๋ง๋คใ . ์ฒซ ํด๋ก ์ฝ๋ฉ์ด๋ค ๋ณด๋ ๋ชจ๋ฅด๋ ๊ฒ ๋ง์ ์๋ฐ์ ์์ง๋ง ์ด๋ก ๋ง ๋ฐฐ์ธ ๋์๋ ํ์คํ ๋ค๋ฅธ ๊ฒ ๊ฐ๋ค. ์ค์ ์์ ์ด๋ป๊ฒ ์ฐ์ด๋์ง ๋ณด๋๊น ์ด๋ก ํ ๋๋ณด๋ค ๋ ์๋ฟ๋๋ค. ์ ์ฐจ ๋์์ง ์์ผ๋ก๊ฐ ๊ธฐ๋๋๋ค!
'๐ฅ๏ธ Clone Coding' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(6) (0) | 2022.05.19 |
---|---|
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(5) (0) | 2022.04.23 |
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(3) (0) | 2022.04.19 |
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต(2) (0) | 2022.04.19 |
๋ ธ๋ง๋ ์ฝ๋ - ์ฝ์ฝ์ํก ํด๋ก ์ฝ๋ฉ ์ฐ์ต (0) | 2022.04.17 |