home강의 홈으로
Section 5. 파이널 프로젝트
Lesson 2. 상단 인트로

👉 완성본 보기


<section class="intro"> <div class="intro__dark"> <div class="intro__type"> <div><span aria-hidden="true">😎</span> 코딩이</div> <div>즐거워진다<span class="underscore">_</span></div> </div> </div> <div class="intro__tilt"></div> <div class="intro__tilt--flip"></div> </section>

1-intro.css


1. 사진배경화면

.intro { position: relative; background-image: url('../images/intro-bg.jpg'); background-size: cover; background-position: center; }

모바일

.intro { height: 100vh; }

데스크탑

.intro { height: 500px; }

2. 배경 어둡게

/* 배경 이미지를 반투명 검정으로 가리기 */ .intro__dark { position: absolute; top: 0; bottom: 0; left: 0; right: 0; text-align: center; background-color: rgba(0, 0, 0, 0.67); }

3. 타이핑 텍스트

.intro__type { display: inline-flex; gap: 0.32em; font-family: var(--font-code); font-size: 2.8em; font-weight: bold; color: white; }

모바일

.intro__type { margin-top: 36vh; flex-direction: column; text-align: left; }

데스크탑

.intro__type { margin-top: 172px; align-items: center; } .intro__type span { display: inline-block; vertical-align: middle; margin-bottom: 0.25em; }

4. 깜빡이 애니메이션

@keyframes blink { from { opacity: 0; } to { opacity: 1; } } .intro__type .underscore { animation-name: blink; animation-duration: 350ms; animation-iteration-count: infinite; animation-direction: alternate; }

5. 하단의 빨강 도형들

[class^="intro__tilt"] { position: absolute; bottom: 0; left: 0; width: 100%; height: 25%; background-color: var(--color-main); clip-path: polygon(100% 90%, 100% 100%, 0 100%, 0 0); } .intro__tilt--flip { clip-path: polygon(100% 0, 100% 100%, 0 100%, 0 90%); opacity: 0.5; }

🤔얄코에게 질문하기질문은 반.드.시 이리로 보내주세요! ( 강의사이트 질문기능 ✖ )

강의에서 이해가 안 되거나 실습상 문제가 있는 부분,
설명이 잘못되었거나 미흡한 부분을 메일로 알려주세요!

답변드린 뒤 필요할 경우 본 페이지에
관련 내용을 추가/수정하도록 하겠습니다.

이메일 주소
yalco@yalco.kr
메일 제목 (반드시 아래 제목을 붙여넣어주세요!)
[질문] 제대로 파는 HTML & CSS (유료 파트) 5-2

🛑질문 전 필독!!

  • 구글링을 먼저 해 주세요. 들어오는 질문의 절반 이상은 구글에 검색해 보면 1분 이내로 답을 찾을 수 있는 내용들입니다.
  • 오류 메시지가 있을 경우 이를 구글에 복붙해서 검색해보면 대부분 짧은 시간 내 해결방법을 찾을 수 있습니다.
  • 강의 페이지에 추가사항 등 놓친 부분이 없는지 확인해주세요. 자주 들어오는 질문은 페이지에 추가사항으로 업데이트됩니다.
  • "유료파트의 강의페이지는 어디 있나요?" - 각 영상의 시작부분 검은 화면마다 해당 챕터의 강의페이지 링크가 있습니다.
  • 질문을 보내주실 때는 문제가 어떻게 발생했고 어떤 상황인지 등을 구체적으로 적어주세요. 스크린샷을 첨부해주시면 더욱 좋습니다.
🌏 Why not change the world?