whatisthis?

Project. ๋ฐ˜์‘ํ˜• ํŽ˜์ด์ง€ - (3) Service Section ๋ณธ๋ฌธ

PROJECT/WEB

Project. ๋ฐ˜์‘ํ˜• ํŽ˜์ด์ง€ - (3) Service Section

thisisyjin 2022. 3. 2. 13:34

(3) Service Section

 

๐Ÿ“Œ HTML + CSS ์ž‘์„ฑ

 

- html ๋งˆํฌ์—… ๊ตฌ์„ฑ

 

์ด๋ฒˆ์—๋Š” desktop์—์„œ (>=768px) col-6์ด ๋‘๊ฐœ๊ฐ€ ๋˜๋ฏ€๋กœ

col-12 ๋‘๊ฐœ๋ฅผ ๋งŒ๋“ค์–ด์•ผํ•œ๋‹ค.

 

[๊ตฌ์กฐ] container > row > col-12 * 2

 

์—ฌ๊ธฐ์„œ, col-12 ๋Š” ๋‘˜๋‹ค col-md-6์ด๋ผ๋Š” ์†์„ฑ์„ ๊ฐ€์ ธ์•ผ ํ•œ๋‹ค.

 

๐Ÿ”ป bootStrap Breakpoint๋ฅผ ๋ณด๋ฉด md = medium = 768์ด์ƒ.

<div class="container">
  <div class="row">
    <div class="col-12 col-md-6">
      <h2>Master the Fundamentals while Exploring new Tech</h2>
      <p>
        We teach cutting-edge tech Full Stack Javascript as well as
        Computer Science fundamentals.
      </p>
    </div>
    <div class="col-12 col-md-6">
      <h2>Develop Production Level Web Applications</h2>
      <p>
        You put your knowledge into action with carefully designed
        assignments and personal software engineering projects.
      </p>
    </div>
  </div>
</div>

 

 

์ž˜ ๋™์ž‘ํ•œ๋‹ค.

 

 

 

 

- ๋‚ด๊ฐ€ ์ง์ ‘ ์ฝ”๋”ฉํ•ด๋ณธ ๊ฒƒ ๐Ÿ”ป

 

index.html

<!-- ์ƒ๋žต -->

<section class="service">
      <div class="container">
        <div class="row">
          <div class="col-12 col-md-6">
            <h2 class="service-title">
              Master the Fundamentals while Exploring new Tech
            </h2>
            <p class="service-desc">
              We teach cutting-edge tech Full Stack Javascript as well as
              Computer Science fundamentals.
            </p>
          </div>
          <div class="col-12 col-md-6">
            <h2 class="service-title">
              Develop Production Level Web Applications
            </h2>
            <p class="service-desc">
              You put your knowledge into action with carefully designed
              assignments and personal software engineering projects.
            </p>
          </div>
        </div>
      </div>
    </section>

 

style.css

/* Service */

.service {
  padding: 80px 0px;
  background-color: #f4f5f7;
}

.service-title {
  font-size: 22px;
  line-height: 1.36363636;
  letter-spacing: -0.04em;
  color: #2b292d;
  margin-bottom: 16px;
}

.service .col-12:first-child {
  margin-bottom: 40px;
}
/* >= 768px (Desktop) */

@media screen and (min-width: 768px) {
  /* ๐Ÿ”บ ์ดํ•˜ ์ƒ๋žต */

  /* Service */
  .service-title {
    font-size: 26px;
    line-height: 1.30769231;
  }

  .service .col-12:first-child {
    margin-bottom: 0;
  }
}

 

 

 

margin-bottom

์ฒ˜์Œ์— ์—ฌ๊ธฐ margin-bottom์„ ์ค„ ๋•Œ,

service-desc ์ž์ฒด์— margin-bottom:40px์„ ํ•ด์คฌ๋Š”๋ฐ,

์•„๋ฌด๋ž˜๋„ ์ด๊ฒƒ์€

col-12์™€ col-12๊ฐ„์— margin์„ ์ฃผ๋Š” ๊ฒƒ ์ด๋ฏ€๋กœ 

col-12 ์ž์ฒด์— (์ฒซ๋ฒˆ์งธ ๊ฑฐ) ์Šคํƒ€์ผ์„ ์ฃผ์ž.

 

.service .col-12:first-child {
  margin-bottom: 40px;
}

 

โ—โ— ์ฃผ์˜
container, row, col ๋“ฑ์— ์ ˆ๋Œ€๋กœ!
margin/padding(์ขŒ์šฐ)๋‚˜ width, height๋ฅผ ์ค˜์„  ์•ˆ๋œ๋‹ค.
์ƒํ•˜ margin, padding์€ ๊ดœ์ฐฎ์Œ.

 

์™„์„ฑ.

 


๐Ÿ”ป Design File

 

Figma

Created with Figma

www.figma.com

 

๐Ÿ”ปReference Lecture

 

๊น€๋ฒ„๊ทธ์˜ HTML&CSS๋Š” ์žฌ๋ฐŒ๋‹ค - ๊ตฌ๋ฆ„EDU

HTML&CSS๋ฅผ ํ•œ๋ฒˆ์—! ํƒ„ํƒ„ํ•œ ๊ฐœ๋…์ดํ•ด๋ถ€ํ„ฐ ์‹ค์Šต๊นŒ์ง€ ํ•œ ๊ฐ•์˜๋กœ ๋๋‚ด๊ธฐ, ์‹ค๋ฌด ๊ฐ€๋Šฅํ•œ ์‹ค๋ ฅ์œผ๋กœ ๐Ÿ˜Ž

edu.goorm.io