๋ ์ด์์ : ์ ์ฒด ์ฌ์ดํธ ์ ํ01
์ง๊ธ๊น์ง ์นด๋ ์ ํ, ํ ์คํธ ์ ํ, ์ด๋ฏธ์ง/ํ ์คํธ ์ ํ ๋ฑ ๋ค์ํ ์ ํ์ ๋ ์ด์์์ ์์ ํด ๋ณด์์ต๋๋ค. ์ด๋ฒ์๋ ์์ ํ๋ ์ ํ๋ค์ ๋ชจ๋ ํ ๊ณณ์ ๋ชจ์ ์ ์ฒด์ ์ธ ์ฌ์ดํธ ํ ํ์ด์ง๋ฅผ ๋ง๋ค๊ณ , ๋ฏธ๋์ด ์ฟผ๋ฆฌ๊น์ง ์์ ํด ๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค.
HTML ์์ค
HTML ์์ค๋ ์ง๊ธ๊น์ง ์์ ํ ๋ชจ๋ ๊ฒ๋ค์ ํ ๊ณณ์ ๋ชจ์ ๊ฒ๊ณผ ๊ฐ์ต๋๋ค. ํค๋ ๋ฉ๋ด๋ ์น์์๋ ์ผ๋ฐ์ ์ธ ๋ฉ๋ด ํํ๋ก, ๋ชจ๋ฐ์ผ์์๋ ํ๋ฒ๊ฑฐ ๋ฉ๋ด๋ก ์์ ํด ์ฃผ์์ต๋๋ค. ๊ฐ ๋ฉ๋ด๋ฅผ ํด๋ฆญํ์ ๋, ๊ฐ๊ฐ์ ์์น๋ก ์ด๋ํ ์ ์๋๋ก ๊ฐ ์์ญ์ section ํ๊ทธ๋ก ์์ ํด ์ฃผ์์ต๋๋ค. ์ฌ๋ผ์ด๋ ์์ญ์ ๋ค์ ์์ ํด์ค ์ด์ ๋ swiper๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํจ์ ๋๋ค. ๋๋๊ทธ๋ฅผ ํตํ ์ด๋ฏธ์ง ์ฌ๋ผ์ด๋ ํจ๊ณผ๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํด swiper๋ฅผ ์ด์ฉํ๊ณ , swiper์ style์ ๋ง์ถ์ด ํด๋์ค๋ฅผ ์๋กญ๊ฒ ๋ถ์ฌํด ์ฃผ์์ต๋๋ค.
HTML
<div id="skip">
<a href="#">ํค๋ ์์ญ ๋ฐ๋ก๊ฐ๊ธฐ</a>
<a href="#">์ฌ๋ผ์ด๋ ์์ญ ๋ฐ๋ก๊ฐ๊ธฐ</a>
<a href="#">์ด๋ฏธ์ง ์์ญ ๋ฐ๋ก๊ฐ๊ธฐ</a>
<a href="#">์ด๋ฏธ์ง/ํ
์คํธ ์์ญ ๋ฐ๋ก๊ฐ๊ธฐ</a>
<a href="#">์นด๋ ์์ญ ๋ฐ๋ก๊ฐ๊ธฐ</a>
<a href="#">๋ฐฐ๋ ์์ญ ๋ฐ๋ก๊ฐ๊ธฐ</a>
<a href="#">ํ
์คํธ ์์ญ ๋ฐ๋ก๊ฐ๊ธฐ</a>
<a href="#">ํธํฐ ์์ญ ๋ฐ๋ก๊ฐ๊ธฐ</a>
</div>
<!-- //skip (for ์นํ์ค ์ค์) -->
<!-- header -->
<header id="headerType" class="header__wrap nexon">
<div class="header__inner">
<div class="header__logo">
<a href="#">CUTE</a>
</div>
<nav class="header__menu">
<ul>
<li class="active"><a href="#sliderType">MAIN</a></li>
<li><a href="#imageType">DOG</a></li>
<li><a href="#imgTextType">CAT</a></li>
<li><a href="#cardType">MORE</a></li>
<li><a href="#bannerType">BANNER</a></li>
<li><a href="#textType">ETC</a></li>
<li><a href="#footerType">FOOTER</a></li>
</ul>
</nav>
<div class="header__member">
<a href="#">๋ก๊ทธ์ธ</a>
</div>
</div>
</header>
<!-- //header -->
<section id="sliderType" class="slider__wrap">
<h2 class="blind">์ฌ๋ผ์ด๋ ์์ญ</h2>
<div class="slider__inner">
<!-- <div class="slider">
<div class="slider__img">
<div class="desc">
<span>ANIMAL</span>
<h3>CUTE ANIMAL</h3>
<p>
์์ ์ ์ง์น ์ด๋ค์ ์ํ ํ๋ง ๊ณต๊ฐ์
๋๋ค.<br />
๊ท์ฌ์ด ๋๋ฌผ๋ค์ ๋ณด๋ฉฐ ์ ์๋๋ง ํ์ค๋ํผ๋ฅผ ํฉ์๋ค.
</p>
<div class="btn">
<a href="#">์์ธํ ๋ณด๊ธฐ</a>
<a href="#" class="black">์ฌ์ดํธ ๋ณด๊ธฐ</a>
</div>
</div>
</div>
<div class="slider__arrow"> -->
<!-- blind๋ ๋จ์ ๊ธ์ ์จ๊น, ir์ ์ด๋ฏธ์ง์ altํจ๊ณผ ๋์ฒด -->
<!-- <a href="#" class="left"><span class="ir">์ด์ ์ด๋ฏธ์ง</span></a>
<a href="#" class="right"><span class="ir">๋ค์ ์ด๋ฏธ์ง</span></a>
</div>
<div class="slider__dot">
<a href="#" class="dot active"><span class="ir">1</span></a>
<a href="#" class="dot"><span class="ir">2</span></a>
<a href="#" class="dot"><span class="ir">3</span></a>
<a href="#" class="play"><span class="ir">ํ๋ ์ด</span></a>
<a href="#" class="stop"><span class="ir">์ ์ง</span></a>
</div>
</div> -->
<div class="swiper mySwiper">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="desc">
<span>ANIMAL</span>
<h3>CUTE ANIMAL</h3>
<p>
์์ ์ ์ง์น ์ด๋ค์ ์ํ ํ๋ง ๊ณต๊ฐ์
๋๋ค.<br />
๊ท์ฌ์ด ๋๋ฌผ๋ค์ ๋ณด๋ฉฐ ์ ์๋๋ง ํ์ค๋ํผ๋ฅผ ํฉ์๋ค.
</p>
<div class="btn">
<a href="#">์์ธํ ๋ณด๊ธฐ</a>
<a href="#" class="black">์ฌ์ดํธ ๋ณด๊ธฐ</a>
</div>
</div>
</div>
<div class="swiper-slide">
<div class="desc">
<span>ANIMAL</span>
<h3>CUTE ANIMAL</h3>
<p>
์์ ์ ์ง์น ์ด๋ค์ ์ํ ํ๋ง ๊ณต๊ฐ์
๋๋ค.<br />
๊ท์ฌ์ด ๋๋ฌผ๋ค์ ๋ณด๋ฉฐ ์ ์๋๋ง ํ์ค๋ํผ๋ฅผ ํฉ์๋ค.
</p>
<div class="btn">
<a href="#">์์ธํ ๋ณด๊ธฐ</a>
<a href="#" class="black">์ฌ์ดํธ ๋ณด๊ธฐ</a>
</div>
</div>
</div>
<div class="swiper-slide">
<div class="desc">
<span>ANIMAL</span>
<h3>CUTE ANIMAL</h3>
<p>
์์ ์ ์ง์น ์ด๋ค์ ์ํ ํ๋ง ๊ณต๊ฐ์
๋๋ค.<br />
๊ท์ฌ์ด ๋๋ฌผ๋ค์ ๋ณด๋ฉฐ ์ ์๋๋ง ํ์ค๋ํผ๋ฅผ ํฉ์๋ค.
</p>
<div class="btn">
<a href="#">์์ธํ ๋ณด๊ธฐ</a>
<a href="#" class="black">์ฌ์ดํธ ๋ณด๊ธฐ</a>
</div>
</div>
</div>
</div>
<div class="swiper-pagination"></div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
</div>
</section>
<!-- //sliderType -->
<section id="imageType" class="card__wrap nexon section">
<h2>๊ท์ฌ์ด ๋๋์ด</h2>
<p>๋ญ๋๋ญ๋ํด๋ ๊ท์ฌ์ด ๋๋ฌผ ํ๋ฉด ๊ฐ์์ง์ฃ . ์ฐ์ ๊ฐ์์ง๋ค์ ๋ณด์ธ์.</p>
<div class="image__inner container">
<div class="image img1">
<h3 class="image__title">Shih Tzu</h3>
<p class="image__desc">
ํ์ ์ด ์ฝ๊ฐ ๋ฉ์ฒญํด ๋ณด์ด๋ ๊ฒ ์ ๋ง ๊ท์ฝ์ต๋๋ค.<br />
์ค์ ๋ก๋ ๋ฉ์ฒญํ ๊ฒ ๊ฐ์ต๋๋ค.
</p>
<a class="image__btn" href="#" title="์์ธํ ๋ณด๊ธฐ">
<div class="more">์์ธํ ๋ณด๊ธฐ</div>
</a>
</div>
<div class="image img2">
<h3 class="image__title">French Bulldog</h3>
<p class="image__desc">
๋ณผ์๋ก ๋งค๋ ฅ์๋ ๊ฒฌ์ข
์
๋๋ค.<br />
์นจ์ ์์ฃผ ์ค์ค ํ๋ฆฐ๋ค๊ณ ํฉ๋๋ค.
</p>
<a class="image__btn blue" href="#" title="์์ธํ ๋ณด๊ธฐ">
<div class="more">์์ธํ ๋ณด๊ธฐ</div>
</a>
</div>
</div>
</section>
<!-- //imageType -->
<section id="imgTextType" class="imgText__wrap nexon section">
<h2 class="blind">๊ณ ์์ด๊ฐ ๋น ์ง๋ฉด ์ญํ๋ค</h2>
<div class="imgText__inner container">
<div class="imgText__txt">
<span>๊ณ ์์ด ์์ญ</span>
<h3>๊ณ ์์ด๊ฐ ๋น ์ง๋ฉด ์ญํ๋ค</h3>
<p>๊ณ ์์ด๊ฐ ์ฑ๊ฒฉ์ ๋์๋ค์ง๋ง, <br />๊ฐ์์ง๋ค๋ ๋ค ์ข์ ๋
์๋ค๋ง์ ์๋์์์.</p>
<ul>
<li><a href="#">Persian</a></li>
<li><a href="#">Siamese</a></li>
<li><a href="#">Sphynx</a></li>
<li><a href="#">ragdoll</a></li>
<li><a href="#">Scottish Fold</a></li>
<li><a href="#">Turkish angora</a></li>
</ul>
</div>
<div class="imgText__img img1">
<a href="#">์ท์๋ฝ ๋ฌผ์ด๋ฏ๊ธฐ๊ธฐ</a>
</div>
<div class="imgText__img img2">
<a class="blue" href="#">๋ฅ๋ฅํ์น ํ๋๋ ค ๋ง๊ธฐ</a>
</div>
</div>
</section>
<!-- //imgTextType -->
<section id="cardType" class="card__wrap nexon section">
<h2>More Cute Animal</h2>
<p>๋ ๋ค์ํ ๋๋ฌผ์ ์ํ์๋์? ์ด๋ค ๋๋ฌผ์ ์ข์ํ์ธ์?</p>
<div class="card__inner container">
<article class="card">
<figure class="card__header">
<img src="assets/img/card_bg01.jpg" alt="๋๊ณ ๋" />
</figure>
<div class="card__body">
<h3 class="tit">Dolphin</h3>
<p class="desc">๋๊ณ ๋๊ฐ ๊ทธ๋ ๊ฒ ์์
ํ ๋๋ฌผ์ด๋ผ๊ณ ํ์ฃ . ๊ทผ๋ฐ ์ฌ์ค ๊ทธ ์ปค๋ค๋ ๋ฐ๋ท์์ ๋ฉ์ฒญํ ๋ฌผ๊ณ ๊ธฐ๋ค ์ฌ์ด์์
์ ๋ง ๋๋ํ ๋๊ณ ๋๋ผ๋ฉด ์ ๋ผ๋ ๋ค๋ฅธ ๋ฌผ๊ณ ๊ธฐ๋ค์ ์ฅ๋๊ฐ์ผ๋ก ์๊ฐํ ๊ฒ ๊ฐ์ต๋๋ค. ์ง๊ฐ ๋ฐ๋ค์ ์์ด์ผ ๋ญ์ผ...
์ข์ ๋๋ฌผ์ธ์ง ๋์ ๋๋ฌผ์ธ์ง ํท๊ฐ๋ฆฌ๋ค์.</p>
<a class="brn" href="#"> ๋๋ณด๊ธฐ </a>
</div>
</article>
<article class="card">
<figure class="card__header">
<img src="assets/img/card_bg02.jpg" alt="๋ผ์ฟค" />
</figure>
<div class="card__body">
<h3 class="tit">Raccoon</h3>
<p class="desc">๋ผ์ฟค์ธ์ง ๋๊ตฌ๋ฆฌ์ธ์ง ๊ตฌ๋ณ ๋ฐฉ๋ฒ์ ์๋ค์ง๋ง ๊ตณ์ด ๋ฐ์ง๊ณ ์ถ์ง๋ ์๋ค์. ๋ผ์ฟค์ ๋งค๋ ฅํฌ์ธํธ๋ ์ญ์ ๋ฐ๋ฐ๋ฅ์ด์ฃ .
๋ผ์ฟค ์นดํ์์ ์
์ํ๋ค๊ฐ ํ์ฐ๋ฅผ ๋นผ์๊ฒผ๋ ์ ์ข์ ๊ธฐ์ต์ด ๋ ์ค๋ฅด๋ค์. ์ ๋ ํ์ฐ๋ฅผ ๋ผ๋ฉด ์ ๋๋ ๋ด
๋๋ค.</p>
<a class="brn" href="#"> ๋๋ณด๊ธฐ </a>
</div>
</article>
<article class="card">
<figure class="card__header">
<img src="assets/img/card_bg03.jpg" alt="๋ผ์ง" />
</figure>
<div class="card__body">
<h3 class="tit">Pig</h3>
<p class="desc">์๊ธฐ ๋ผ์ง๋ ์ฐธ ๊ท์ฝ๋ค์. ์ ๊ฐ ์ต๊ทผ์ ํ์ค์ค๋ฌ์ด ๋ผ์ง ๋จธ๋ฆฌ ์ฌ์ง์ ๋ณด๊ณ , ํ์ฅํ๋ ์๋๊ตญ์ ๋ช ๋ฌ์งธ ๋๊ณ ์์ต๋๋ค.
์ ๊ฐ ๋น์๊ฐ ๋์ ํธ์ ์๋๋ฐ ์ง์ง... ๊ถ๊ธํ์๋ฉด, ์๋ ๋๋ณด๊ธฐ๋ฅผ ํด๋ฆญํ์๋ฉด ์๋ฌด๊ฒ๋ ์ ๋์ต๋๋ค.</p>
<a class="brn" href="#"> ๋๋ณด๊ธฐ </a>
</div>
</article>
</div>
</section>
<!-- //cardType -->
<section id="bannerType" class="banner__wrap nexon">
<h2 class="blind">๋ฐฐ๋ ์์ญ</h2>
<div class="banner__inner">
<h3 class="title">์ ๋ณด์
จ๋์?</h3>
<p class="desc">
์ด์ ํ์ค์ ์ง์ํ์๊ณ , ์๋์ ์ฃผ์๋ฅผ ๋๋ฌ ๊นํ๋ธ๋ก ์ด๋ํ์ธ์.
<a href="#" title="๊นํ๋ธ ํ์ด์ง๋ก ์ด๋">github.com</a>
</p>
<span class="small">Get out and do homework!</span>
</div>
</section>
<!-- //bannerType -->
<section id="textType" class="text__Wrap nexon section">
<span>๊ธ๋ก๋ ํํํ๊ธฐ ํ๋ ๊ท์ฌ์</span>
<h2>๋ค ๋ฐ ๋ฌ๋ฆฐ ๋๋ฌผ๋ค์ ๋ค ๊ท์ฝ๋ค</h2>
<div class="text__inner container">
<div class="text t1">
<h3 class="text__title">Sloth</h3>
<p class="text__desc">๋จ์๋ฉ๋ฆฌ์นด, ์ค์ ์๋ฉ๋ฆฌ์นด์ ์ด๋๋ฆผ์ ์์ํ๋ ๋๋ฌผ์
๋๋ค. ์์ ์ ๋๋ถ๋ถ์ ๋๋ฌด์ ๋งค๋ฌ๋ ค ๋ณด๋ธ๋ค๊ณ ํฉ๋๋ค.
์ฃผ*ํผ์๊ฐ ์๊ฐ๋ฉ๋๋ค. ๋ชป์๊ธด ๋
์...</p>
<a class="text__btn" href="#">๋๋ณด๊ธฐ</a>
</div>
<div class="text t2">
<h3 class="text__title">Chameleon</h3>
<p class="text__desc">๋ณํํ๋ ๋ชธ์ ์์ด ํน์ง์ธ ๋๋ฌผ์
๋๋ค. ์ธ๊ณ ๊ฐ์ฒด ์์ ์ ๋ฐ์ด ๋ง๋ค๊ฐ์ค์นด๋ฅด ์ฌ์ ์ฐ๋ค๊ณ ํฉ๋๋ค.
์ธ๊ณ ๊ฐ์ฒด ์๋ ์ด๋ป๊ฒ ์ธก์ ํ์๊น์? ๊ดํ ์ด๋ฐ ๊ฒ ๊ถ๊ธํฉ๋๋ค.</p>
<a class="text__btn" href="#">๋๋ณด๊ธฐ</a>
</div>
<div class="text t3">
<h3 class="text__title">Meerkat</h3>
<p class="text__desc">๋จ์ํ๋ฆฌ์นด ๊ณตํ๊ตญ๊ณผ ์๊ณจ๋ผ ์ฌ๋ง์ ์์ํฉ๋๋ค. ๋ ์์ ๋ชจ์ผ๊ณ ํ์์ด์ ํก์ํ๋ค๊ณ ํฉ๋๋ค.
๋ฏธ์ด์บฃ ์ธ์์๋ฆฌ ๋ค์ด๋ณด์
จ๋์? ์ฝ๊ฐ ์ถฉ๊ฒฉ์ ์
๋๋ค.</p>
<a class="text__btn" href="#">๋๋ณด๊ธฐ</a>
</div>
<div class="text t4">
<h3 class="text__title">Koala</h3>
<p class="text__desc">ํธ์ฃผ์ ์์ํ๋ ์ ๋๋ฅ์
๋๋ค. ๋ฌด๋ฆฌ๋ฅผ ๋ง๋ค์ง ์๊ณ ํผ์ ์ํํ๋ค๊ณ ํฉ๋๋ค. ๊ทธ๋ฅ ์น๊ตฌ๊ฐ ์๋ ๊ฑด ์๋๊น์?
์ด๊ฑด ์ด์ฉ๋ฉด... ์ ์ด์ผ๊ธฐ์ผ์ง๋ ๋ชจ๋ฆ
๋๋ค.</p>
<a class="text__btn" href="#">๋๋ณด๊ธฐ</a>
</div>
<div class="text t5">
<h3 class="text__title">Penguin</h3>
<p class="text__desc">ํญ๊ท์ ํญ๊ท๋ชฉ ํญ๊ท๊ณผ์ ์ํ๋ ๋ ์ง ๋ชปํ๋ ์์ ์ด์นญ์
๋๋ค. ๋ฌด๋ฆฌ์์ ์ํํ๋ ์ฌํ์ฑ์๋ ๋๋ฌผ๋ก ์ ๋ช
ํฉ๋๋ค.
์ฝ์๋ผ์๋ ์์ฃผ ์ ๋ฐ๋๋ค์. ์ธ์ธ ๋๋ฌผ.</p>
<a class="text__btn" href="#">๋๋ณด๊ธฐ</a>
</div>
<div class="text t6">
<h3 class="text__title">Alpaca</h3>
<p class="text__desc">์ํ์นด๋ ๋ณธ๋ ์ง๋จ ์ํ์ ํ๋ ๋๋ฌผ์ด๋ผ ํค์ธ ๋๋ ๋ฐ๋์ ๋๋ง๋ฆฌ ์ง์ ๋ง๋ค์ด์ ํค์์ผ ํ๋ค๊ณ ํฉ๋๋ค.
์๊ฐ ๊ทธ ์นจ ๋ฑ๋ ์ ๋ง์ฃ ? ๋๋ฝ๊ฒ ์นจ์...</p>
<a class="text__btn" href="#">๋๋ณด๊ธฐ</a>
</div>
</div>
</section>
<!-- //textType -->
<!-- footer -->
<section id="footerType" class="footer__wrap nexon section">
<h2 class="blind">ํธํฐ ์์ญ</h2>
<div class="footer__inner container">
<div class="footer__menu">
<div>
<h3>CUTE</h3>
<ul>
<li><a href="#">MAIN</a></li>
<li><a href="#">DOG</a></li>
<li><a href="#">CAT</a></li>
<li><a href="#">BANNER</a></li>
<li><a href="#">ETC</a></li>
</ul>
</div>
<div>
<h3>DOG</h3>
<ul>
<li><a href="#">Shih Tzu</a></li>
<li><a href="#">French Bulldog</a></li>
</ul>
</div>
<div>
<h3>CAT</h3>
<ul>
<li><a href="#">Bite</a></li>
<li><a href="#">Punch</a></li>
</ul>
</div>
<div>
<h3>MORE</h3>
<ul>
<li><a href="#">Dolphin</a></li>
<li><a href="#">Raccoon</a></li>
<li><a href="#">Pig</a></li>
</ul>
</div>
<div>
<h3>ETC</h3>
<ul>
<li><a href="#">Sloth</a></li>
<li><a href="#">Chameleon</a></li>
<li><a href="#">Meerkat</a></li>
<li><a href="#">Koala</a></li>
<li><a href="#">Penguin</a></li>
<li><a href="#">Alpaca</a></li>
</ul>
</div>
</div>
<div class="footer__right">
2022 mo0647. Portfolio is Power<br />
All rights reserved.
</div>
</div>
</section>
<!-- //footer -->
CSS ์์ค
CSS๋ ๊ณตํต์ ์คํ์ผ ์ํธ์ธ fonts, reset, common์ ๋จผ์ ์์ ํด ์ฃผ๊ณ , ๊ฐ๊ฐ์ ์น์ ๋ณ๋ก ์คํ์ผ ์ํธ๋ฅผ ๊ฐ๋ณ์ ์ผ๋ก ์์ ํด ์ฃผ์์ต๋๋ค.
header
.header__inner {
width: 100%;
height: 70px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
box-sizing: border-box;
border-bottom: 1px solid #ccc;
position: fixed;
left: 0;
top: 0;
z-index: 10000;
background: #fff;
}
.header__logo {
width: 15%;
font-size: 30px;
font-weight: 700;
text-transform: uppercase;
}
.header__logo em {
font-size: 18px;
font-weight: 400;
}
.header__menu {
width: 70%;
text-align: center;
}
.header__menu li {
display: inline;
}
.header__menu li a {
padding: 13px 30px;
margin: 0 5px;
transition: background-color 0.3s;
}
.header__menu li a:hover,
.header__menu li.active a {
border-bottom: 5px solid black;
}
.header__member {
width: 15%;
text-align: right;
}
.header__member a {
font-size: 16px;
border: 1px solid #000;
padding: 10px 30px;
border-radius: 50px;
transition: all 0.3s;
}
.header__member a:hover {
background-color: #000;
color: #fff;
}
.header__ham {
position: absolute;
right: 10px;
top: 10px;
z-index: 1000;
width: 50px;
height: 50px;
display: none;
cursor: pointer;
}
.header__ham span {
display: block;
background: #000;
width: 30px;
height: 2px;
border-radius: 3px;
margin-left: 10px;
margin-top: 5px;
transition: 0.25s margin 0.25s, 0.25s transform;
}
.header__ham span:nth-child(1) {
margin-top: 18px;
}
.header__ham.active span {
transition: 0.25s margin, 0.25s transform 0.25s;
}
.header__ham.active span:nth-child(1) {
margin-top: 25px;
margin-bottom: -7px;
transform: rotate(45deg);
}
.header__ham.active span:nth-child(2) {
transform: rotate(45deg);
}
.header__ham.active span:nth-child(3) {
margin-top: -2px;
transform: rotate(135deg);
}
/* media */
@media (max-width: 1300px) {
.header__ham {
display: block;
}
.header__menu {
position: fixed;
right: -100%;
top: 70px;
width: auto;
padding: 10px;
text-align: center;
background-color: #fff;
transition: right 0.4s ease-in;
}
.header__menu.overlay {
right: 0;
}
.header__menu li {
display: block;
padding: 10px;
margin: 10px;
}
.header__menu li a {
font-size: 22px;
opacity: 0;
}
.header__menu.overlay li a {
opacity: 1;
}
.header__member {
margin-right: 50px;
width: 50%;
}
.header__logo {
width: 50%;
}
.header__menu li a:hover,
.header__menu li.active a {
border-bottom: 2px solid black;
}
}
@media (max-width: 600px) {
.header__menu li a {
font-size: 3vw;
opacity: 0;
}
}
Slider
.swiper-slide {
background: url(../img/slider01_bg01.jpg) no-repeat center / cover;
}
.swiper-slide .desc {
width: 1160px;
margin: 0 auto;
padding: 100px 0px;
}
.swiper-slide .desc span {
font-size: 16px;
background-color: #000;
color: white;
padding: 1px 14px 0 14px;
border-radius: 30px;
text-transform: uppercase;
margin-bottom: 10px;
display: inline-block;
}
.swiper-slide .desc h3 {
font-size: 110px;
font-weight: 500;
line-height: 1;
color: white;
text-transform: uppercase;
margin-bottom: 16px;
margin-left: -8px;
}
.swiper-slide .desc p {
font-size: 20px;
font-weight: 300;
color: #fff;
line-height: 1.35;
margin-bottom: 130px;
}
.swiper-slide .desc .btn {
}
.swiper-slide .desc .btn a {
font-size: 16px;
background-color: #fff;
padding: 11px 50px;
display: inline-block;
}
.swiper-slide .desc .btn a.black {
background: #000;
color: #fff;
}
.swiper-button-next,
.swiper-button-prev {
width: 30px !important;
height: 56px !important;
background-image: url(../img/slider01_icon.svg);
}
.swiper-button-next {
background-position: -50px 0px;
}
.swiper-button-next:after,
.swiper-button-prev:after {
opacity: 0;
}
.swiper-pagination-bullet {
width: 16px !important;
height: 16px !important;
}
.swiper-pagination-bullet-active {
background-position: 0px -70px !important;
}
/* media */
@media (max-width: 1280px) {
.swiper-slide .desc h3 {
font-size: 70px;
}
.swiper-slide .desc {
width: 100%;
text-align: center;
}
}
@media (max-width: 600px) {
.swiper-slide .desc h3 {
font-size: 42px;
}
.swiper-slide .desc {
margin: 0 auto;
padding: 100px 20px;
box-sizing: border-box;
}
.swiper-slide .desc p {
font-size: 16px;
}
}
Image
.image__inner {
display: flex;
justify-content: space-between;
}
.image {
width: 49%;
color: white;
padding: 200px 30px 30px 30px;
box-sizing: border-box;
}
.image.img1 {
background: url(../img/img01_bg01.jpg) no-repeat center / cover;
}
.image.img2 {
background: url(../img/img01_bg02.jpg) no-repeat center / cover;
}
.image__title {
font-size: 32px;
margin-bottom: 10px;
}
.image__desc {
font-size: 18px;
font-weight: 300;
margin-bottom: 10px;
line-height: 1.5;
}
.image__btn {
font-size: 16px;
color: #fff;
background: #e86e47;
padding: 10px 20px;
display: inline-block;
}
.image__btn.blue {
background: #00a8e5;
}
@media (max-width: 768px) {
.image__inner {
flex-direction: column;
}
.image {
width: 100%;
}
.image__title {
font-size: 24px;
margin-bottom: 10px;
}
.image__desc {
font-size: 16px;
}
}
Image/Text
.imgText__inner {
display: flex;
justify-content: space-between;
}
.imgText__inner > div {
width: 32%;
height: 500px;
}
.imgText__txt span {
font-size: 16px;
color: #666;
text-decoration: underline;
text-underline-position: under;
margin-bottom: 20px;
display: block;
}
.imgText__txt h3 {
font-size: 50px;
font-weight: 500;
word-break: keep-all;
line-height: 1.4;
margin-bottom: 20px;
}
.imgText__txt p {
font-size: 18px;
font-weight: 300;
line-height: 1.5;
color: #666;
margin-bottom: 10px;
word-break: keep-all;
}
.imgText__txt ul {
font-size: 18px;
font-weight: 300;
line-height: 1.6;
}
.imgText__txt ul li {
position: relative;
padding-left: 20px;
}
.imgText__txt ul li a {
color: #666;
}
.imgText__txt ul li::before {
content: "";
width: 5px;
height: 5px;
border-radius: 50%;
position: absolute;
left: 5px;
top: 9px;
background-color: #666;
}
.imgText__img {
border-radius: 10px;
position: relative;
}
.imgText__img a {
background-color: #7c2b39;
color: #fff;
font-size: 20px;
position: absolute;
bottom: 0;
text-align: center;
width: 100%;
padding: 20px 30px;
box-sizing: border-box;
display: inline-block;
}
.imgText__img a.blue {
background-color: #2b387c;
}
.imgText__img.img1 {
background: url(../img/imgText01_bg01.jpg) no-repeat center / cover;
}
.imgText__img.img2 {
background: url(../img/imgText01_bg02.jpg) no-repeat center / cover;
}
@media(max-width:768px) {
.imgText__txt h3 {
font-size: 42px;
}
.imgText__txt span {
display: none;
}
.imgText__inner {
display: block;
}
.imgText__inner > div:first-child {
width: 100%;
height: 400px;
text-align: center;
}
.imgText__inner > div:nth-child(2),
.imgText__inner > div:nth-child(3){
width: 50%;
height: 500px;
float: left;
margin-bottom: 150px;
border-radius: 0px;
}
.imgText__txt ul li::before {
display: none;
}
.imgText__img a {
font-size: 14px;
}
}
Card
#cardType img {
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.card__inner {
display: flex;
justify-content: space-between;
}
.card {
width: 32%;
background-color: #f5f5f5;
border-radius: 10px;
}
.card__body {
padding: 24px;
}
.card__body .tit {
color: black;
font-size: 24px;
margin-bottom: 10px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-right: 20px;
}
.card__body .desc {
font-size: 18px;
line-height: 1.4;
color: #666;
margin-bottom: 20px;
font-weight: 300;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
}
.card__body a {
text-decoration: underline;
}
@media (max-width: 784px) {
.card__inner {
flex-direction: column;
align-items: center;
}
.card {
width: 100%;
border-radius: 0px;
}
#cardType img {
border-top-left-radius: 0px;
border-top-right-radius: 0px;
}
.card__body .desc {
font-size: 16px;
}
}
Banner
.banner__inner {
background-image: url(../img/banner01_bg01.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
text-align: center;
padding: 120px 0;
color: black;
}
.banner__inner .title {
font-size: 50px;
line-height: 1;
font-weight: 500;
margin-bottom: 40px;
}
.banner__inner .desc {
font-size: 24px;
line-height: 1.5;
font-weight: 300;
margin-bottom: 70px;
word-break: keep-all;
}
.banner__inner .desc a {
color: black;
display: block;
}
.banner__inner .desc a:hover {
text-decoration: underline;
}
.banner__inner .small {
font-size: 16px;
text-decoration: underline;
}
@media(max-width: 786px) {
.banner__inner .title {
font-size: 42px;
}
.banner__inner .desc {
font-size: 18px;
}
}
Text
.text__inner {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.text {
width: 32%;
margin-bottom: 2%;
padding: 20px;
box-sizing: border-box;
border-radius: 10px;
transition: background 0.4s;
}
.text:hover {
background: #f5f5f5;
}
.text:hover .text__title{
color: #000;
}
.text__title {
font-size: 24px;
line-height: 1;
margin-bottom: 10px;
text-overflow: ellipsis;
white-space: nowrap;
position: relative;
padding-top: 75px;
}
.text__title::before {
content: '';
position: absolute;
left: 0;
top: 0;
width: 60px;
height: 60px;
border-radius: 50%;
background: url(../img/text01_icon01.svg);
}
.text.t1 .text__title::before {
background-position: 0 0;
}
.text.t2 .text__title::before {
background-position: -60px 0;
}
.text.t3 .text__title::before {
background-position: -120px 0;
}
.text.t4 .text__title::before {
background-position: -180px 0;
}
.text.t5 .text__title::before {
background-position: -240px 0;
}
.text.t6 .text__title::before {
background-position: -300px 0;
}
.text__desc {
font-size: 18px;
font-weight: 300;
line-height: 1.4;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
color: #666;
margin-bottom: 20px;
}
.text__btn {
font-size: 16px;
line-height: 1;
text-decoration: underline;
color: #666;
}
@media(max-width: 768px){
#textType > span {
display: none;
}
.text__desc {
font-size: 16px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
}
.text {
width: 50%;
margin-bottom: 0px;
padding: 10px;
}
}
Footer
.footer__wrap {
background-color: #f5f5f5;
width: 100%;
padding: 50px 0;
}
.footer__menu {
display: flex;
margin-bottom: 30px;
justify-content: center;
}
.footer__menu > div {
width: 185%;
text-align: center;
}
.footer__menu div h3 {
font-size: 18px;
margin-bottom: 20px;
color: #000;
}
.footer__menu div li a {
margin-bottom: 10px;
display: block;
font-size: 14px;
color: #666;
}
.footer__right {
border-top: 1px solid #d9d9d9;
text-align: center;
padding-top: 40px;
color: #666;
line-height: 1.5;
}
@media (max-width: 960px) {
.footer__menu {
display: none;
}
.footer__right {
padding-top: 0;
border-top: 0;
}
.footer__wrap {
padding: 40px 0;
}
}
JAVASCRIPT ์์ค
์๋ฐ์คํฌ๋ฆฝํธ ์์ค๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
//swiper
var swiper = new Swiper(".mySwiper", {
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},
autoplay: {
delay: 2000,
disableOnInteraction: false, /* ์ฌ๋ผ์ด๋๋ฅผ ๋๋๊ทธํ๋ฉด ์ ์ง๋๋ ๋ฒ๊ทธ ์ ๊ฑฐ */
},
pagination: {
el: ".swiper-pagination",
type: "bullets",
clickable: true,
},
});
// ์ ํ์
const btnStop = document.querySelector(".swiper-button-stop");
const btnStart = document.querySelector(".swiper-button-play");
const btnHam = document.querySelector(".header__ham");
const btnMenu = document.querySelector(".header__menu");
// swiper์์ ์ฌ์ ๋ฒํผ์ ๋๋ฅด๋ฉด ์ฌ๋ผ์ด๋ ์ฌ์, ์ฌ์ ๋ฒํผ ์จ๊น, ์ ์ง ๋ฒํผ ๋ํ๋จ
// swiper์์ ์ ์ง ๋ฒํผ์ ๋๋ฅด๋ฉด ์ฌ๋ผ์ด๋ ์ ์ง, ์ ์ง ๋ฒํผ ์จ๊น, ์ฌ์ ๋ฒํผ ๋ํ๋จ
btnStart.style.display = "none";
btnStop.addEventListener("click", () => {
swiper.autoplay.stop();
btnStart.style.display = "block";
btnStop.style.display = "none";
});
btnStart.addEventListener("click", () => {
swiper.autoplay.start();
btnStart.style.display = "none";
btnStop.style.display = "block";
});
// ํ๋ฒ๊ฑฐ๋ฅผ ํด๋ฆญํ๋ฉด ๋ฉ๋ด๊ฐ ๋ํ๋๋๋ก ์ค์
btnHam.addEventListener("click", () => {
btnHam.classList.toggle("active");
btnMenu.classList.toggle("overlay");
});
// ํจ๋ด๋์ค ํจ๊ณผ
window.addEventListener("scroll", () => {
let scrollTop = window.pageYOffset || window.scrollY || document.documentElement.scrollTop;
document.querySelectorAll("section").forEach((el, i) => {
if (scrollTop > el.offsetTop - 500) {
document.querySelectorAll(".header__menu ul li").forEach((li) => {
li.classList.remove("active");
});
document.querySelector(".header__menu ul li:nth-child(" + (i + 1) + ")").classList.add("active");
}
});
});
// ๋ฉ๋ด ์ด๋ ์ ๋ถ๋๋ฝ๊ฒ~
document.querySelectorAll(".header__inner li a").forEach((li) => {
li.addEventListener("click", (e) => {
e.preventDefault();
document.querySelector(li.getAttribute("href")).scrollIntoView({
behavior: "smooth",
});
});
});
๊ฒฐ๊ณผ : Web
๊ฒฐ๊ณผ : Media
'WebSite' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํธํฐ ์ ํ ๋ ์ด์์01 (3) | 2022.09.05 |
---|---|
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ๋ฐฐ๋ ์ ํ ๋ ์ด์์01 (5) | 2022.09.05 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ์ฌ๋ผ์ด๋ ์ ํ ๋ ์ด์์01 (4) | 2022.09.05 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ์ด๋ฏธ์ง ํ ์คํธ ์ ํ ๋ ์ด์์01 (7) | 2022.09.01 |
์น์ฌ์ดํธ ๋ง๋ค๊ธฐ : ํค๋ ์ ํ ๋ ์ด์์01 (7) | 2022.09.01 |
๋๊ธ