Notice
Recent Posts
Recent Comments
Link
๊ด€๋ฆฌ ๋ฉ”๋‰ด

Run with coding

CSS ์†์„ฑ ์ž‘์„ฑ ์ˆœ์„œ | CSS Coding Convention ๋ณธ๋ฌธ

HTML | CSS

CSS ์†์„ฑ ์ž‘์„ฑ ์ˆœ์„œ | CSS Coding Convention

ํ€ธ๋ฆฌ์‚ฌ 2023. 7. 30. 16:35
๐Ÿคซ ์ฝ”๋”ฉ ์ปจ๋ฒค์…˜์ด๋ž€?
์ฝ๊ณ , ๊ด€๋ฆฌํ•˜๊ธฐ ์‰ฌ์šด ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๊ธฐ ์œ„ํ•œ ์ผ์ข…์˜ ์ฝ”๋”ฉ ์Šคํƒ€์ผ ๊ทœ์•ฝ
์ฆ‰, ๋‚ด๋ถ€์ ์ธ ๊ณต๋™์˜ ์•ฝ์†์ด๊ธฐ ๋–„๋ฌธ์— ๋‚ด๋ถ€์ ์œผ๋กœ ์ •ํ•˜๊ธฐ ๋‚˜๋ฆ„์ด๋‹ค.

CSS ์†์„ฑ ๊ธฐ์ˆ  ์ˆœ์„œ (w. ๋ชจ์งˆ๋ผ)

  1. display (์š”์†Œ์˜ ๋…ธ์ถœ ์—ฌ๋ถ€/ํ‘œํ˜„ ๋ฐฉ์‹)
  2. list-style
  3. position (์œ„์น˜/์ขŒํ‘œ)
  4. float
  5. clear
  6. width / height
  7. padding / margin
  8. border / background
  9. color / font
  10. text-decoration
  11. text-align / vertical-align
  12. white-space
  13. other text
  14. content

์™œ ์ด๋Ÿฐ CSS ๊ธฐ์ˆ  ์ˆœ์„œ๊ฐ€ ํ•„์š”ํ• ๊นŒ?

์˜ˆ๋ฅผ ๋“ค์–ด, button์ด๋ผ๋Š” ํด๋ž˜์Šค๋ช…์— css๊ฐ€ ์—ฌ~~~๋Ÿฌ์ค„์ด ๋“ค์–ด๊ฐ€๊ฒŒ ๋˜๋ฉด

๋‚ด๊ฐ€ ์–ด๋””์— ๋ฌด์Šจ css ์ฝ”๋“œ๋ฅผ ์ผ๋Š”์ง€ ์ฐพ๊ธฐ๋„ ํž˜๋“ค ๊ฒƒ์ด๋‹ค.

๋‚˜๋งŒ์˜ ์ปจ๋ฒค์…˜์ด ์žˆ์–ด๋„ ์ข‹์ง€๋งŒ ๋Œ€์ค‘์ ์œผ๋กœ ์“ฐ๋Š” ์ปจ๋ฒค์…˜์„ ์ง€์ผœ์ฃผ๋Š” ๊ฒŒ ์ข‹๋‹ค.

.button {
    min-width: 300px;
    height: 70px;
    background-color: chocolate;
    box-shadow: 0 14px 0 brown, 0 20px 14px rgba(0, 0, 0, 0.2);
    position: absolute;

    top: 50%;
    left: 50%;
    margin-top: -35px;
    margin-left: -150px;
    border-radius: 10px;
    border: none;
    outline: none;
    transition: 0.4s;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
}

// ์œ„๋ฅผ ์†์„ฑ๋ณ„๋กœ ์ •๋ฆฌํ•ด๋ณด๋ฉด!
.button {
	display: flex;
    justify-content: center;
    align-items: center;
    
    position: absolute;
    top: 50%;
    left: 50%;
    
    min-width: 300px;
    height: 70px;
    
    margin-top: -35px;
    margin-left: -150px;
    
    border: none;
    border-radius: 10px;
    outline: none;
    background-color: chocolate;
    box-shadow: 0 14px 0 brown, 0 20px 14px rgba(0, 0, 0, 0.2);
    
    font-size: 24px;
    font-weight: 700;
    color: white;
    
    cursor: pointer;
    transition: 0.4s;
}

'HTML | CSS' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Loading svg rotate animation / Next.js svg ์‚ฌ์šฉํ•˜๊ธฐ  (2) 2022.10.04