๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ’ฌ/ใ…ใ……ใ…Œใ…‹ใ…ใ…… ์ฑŒ๋ฆฐ์ง€

ํŒจ์ŠคํŠธ ์บ ํผ์Šค ์ฑŒ๋ฆฐ์ง€ 14์ผ์ฐจ

โ˜•

14์ผ์ฐจ

 

Part 1. HTML/CSS/JS๋กœ ๋งŒ๋“œ๋Š” ์Šคํƒ€๋ฒ…์Šค ์›น์‚ฌ์ดํŠธ

Ch 10. ์Šคํƒ€๋ฒ…์Šค ์˜ˆ์ œ

 


 

Ch 10. ์Šคํƒ€๋ฒ…์Šค ์˜ˆ์ œ

 

 

์ฃผ์ œ

 

  • ๊ณ ์ • ์ด๋ฏธ์ง€ ๋ฐฐ๊ฒฝ
  • 3D ์• ๋‹ˆ๋ฉ”์ด์…˜
  • ์Šคํฌ๋กค ์œ„์น˜ ๊ณ„์‚ฐ ์• ๋‹ˆ๋ฉ”์ด์…˜
  • ๋‹ค์ค‘ ์š”์†Œ ์Šฌ๋ผ์ด๋“œ
  • ํ‘ธํ„ฐ
  • ํŽ˜์ด์ง€ ์ƒ๋‹จ์œผ๋กœ ์ด๋™(ScrollTo)

 

 

์ฃผ์š” ๋‚ด์šฉ

 

 ๐Ÿ”— HTML Entities (HTML ํŠน์ˆ˜๊ธฐํ˜ธ๋“ค) 

https://dev.w3.org/html5/html-author/charref

 

Character Entity Reference Chart

 

dev.w3.org

 

์‹ค์Šต ํ™”๋ฉด

 

 

์ƒˆ๋กœ ์•Œ๊ฒŒ ๋œ ๋‚ด์šฉ

 

 ๐Ÿ”— ๋’ค์ง‘๊ธฐ ์• ๋‹ˆ๋ฉ”์ด์…˜ 

backface-visibility: hidden;

 

<div class="container">
  <div class="item front">์•ž</div>
  <div class="item back">๋’ค</div>
</div>

 

body {
  padding: 50px;
}
.container {
  width: 100px;
  height: 100px;
  background-color: orange;
  perspective: 300px;
}
.container .item {
  width: 100px;
  height: 100px;
  border: 4px solid red;
  box-sizing: border-box;
  font-size: 60px;
  backface-visibility: hidden;
  transition: 1s;
}
.container .item.front {
  position: absolute;
  transform: rotateY(0deg);
}
.container:hover .item.front {
  transform: rotateY(180deg);
}
.container .item.back {
   transform: rotateY(-180deg);
}
.container:hover .item.back {
  transform: rotateY(0deg);
}

 

 

 ๐Ÿ”— ScrollMagic JS ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ : ์š”์†Œ๊ฐ€ ํ™”๋ฉด์— ๋ณด์—ฌ์ง ์—ฌ๋ถ€์— ๋”ฐ๋ฅธ ์š”์†Œ ๊ด€๋ฆฌ

https://cdnjs.com/libraries/ScrollMagic

 

ScrollMagic - Libraries - cdnjs - The #1 free and open source CDN built to make life easier for developers

The javascript library for magical scroll interactions. - Simple. Fast. Reliable. Content delivery at its finest. cdnjs is a free and open-source CDN service trusted by over 12.5% of all websites, serving over 200 billion requests each month, powered by Cl

cdnjs.com

//? ์š”์†Œ๊ฐ€ ํ™”๋ฉด์— ๋ณด์—ฌ์ง ์—ฌ๋ถ€์— ๋”ฐ๋ฅธ ์š”์†Œ ๊ด€๋ฆฌ
// ๊ด€๋ฆฌํ•  ์š”์†Œ๋“ค ๊ฒ€์ƒ‰!
const spyEls = document.querySelectorAll("section.scroll-spy");
// ์š”์†Œ๋“ค ๋ฐ˜๋ณต ์ฒ˜๋ฆฌ!
spyEls.forEach(function (spyEl) {
  new ScrollMagic.Scene({
    // ๊ฐ์‹œํ•  ์žฅ๋ฉด(Scene)์„ ์ถ”๊ฐ€
    triggerElement: spyEl, // ๋ณด์—ฌ์ง ์—ฌ๋ถ€๋ฅผ ๊ฐ์‹œํ•  ์š”์†Œ๋ฅผ ์ง€์ •
    triggerHook: 0.8, // ํ™”๋ฉด์˜ 80% ์ง€์ ์—์„œ ๋ณด์—ฌ์ง ์—ฌ๋ถ€ ๊ฐ์‹œ
  })
    .setClassToggle(spyEl, "show") // ์š”์†Œ๊ฐ€ ํ™”๋ฉด์— ๋ณด์ด๋ฉด show ํด๋ž˜์Šค ์ถ”๊ฐ€
    .addTo(new ScrollMagic.Controller()); // ์ปจํŠธ๋กค๋Ÿฌ์— ์žฅ๋ฉด์„ ํ• ๋‹น(ํ•„์ˆ˜!)
});

 

 

 ๐Ÿ”— GSAP JS ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ - ScrollToPlugin : ํŽ˜์ด์ง€ ์ƒ๋‹จ์œผ๋กœ ์ด๋™

https://cdnjs.com/libraries/gsap

 

gsap - Libraries - cdnjs - The #1 free and open source CDN built to make life easier for developers

GSAP is a JavaScript library for building high-performance animations that work in **every** major browser. Animate CSS, SVG, canvas, React, Vue, WebGL, colors, strings, motion paths, generic objects...anything JavaScript can touch! No other library delive

cdnjs.com

<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/ScrollToPlugin.min.js" integrity="sha512-agNfXmEo6F+qcj3WGryaRvl9X9wLMQORbTt5ACS9YVqzKDMzhRxY+xjgO45HCLm61OwHWR1Oblp4QSw/SGh9SA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

 

// ์ƒ๋‹จ์œผ๋กœ ์Šคํฌ๋กค ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด,
toTopEl.addEventListener("click", function () {
  // ํŽ˜์ด์ง€ ์œ„์น˜๋ฅผ ์ตœ์ƒ๋‹จ์œผ๋กœ ๋ถ€๋“œ๋Ÿฝ๊ฒŒ(0.7์ดˆ ๋™์•ˆ) ์ด๋™.
  gsap.to(window, 0.7, {
    scrollTo: 0,
  });
});

 

 

  • img ์š”์†Œ๊ฐ€ display: block; + margin: 0 auto; ์ธ ๊ฒฝ์šฐ, width ์†์„ฑ ์—†์ด๋„ ๊ฐ€์šด๋ฐ ์ •๋ ฌ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

 

 

๋Š๋‚€์ 

 

 ํ›„ ๋“œ๋””์–ด ๊ธธ๊ณ  ๊ธด 10์žฅ์ด ๋๋‚ฌ๋‹ค!๐Ÿคฃ ๋ฉฐ์น ๋™์•ˆ ํ•˜๋Š๋ผ ์ค‘๊ฐ„์— ์‚ฐ์œผ๋กœ ๊ฐˆ ๋ป” ํ•œ ์ ๋„ ์žˆ์ง€๋งŒ ๊ณ„ํš๋Œ€๋กœ ๋‹ค ๋๋งˆ์ณ์„œ ๋‹คํ–‰์ด๋‹ค. ํด๋ก ์ฝ”๋”ฉ์ด ๋„์›€์ด ์•ˆ ๋œ๋‹ค๋Š” ์–˜๊ธฐ๋ฅผ ๋งŽ์ด ๋“ค์—ˆ๋Š”๋ฐ ๋‚˜๋„ ์–ด๋Š์ •๋„๋Š” ๊ณต๊ฐํ•œ๋‹ค. ๋ฌผ๋ก  ํ˜ผ์ž ํ”„๋กœ์ ํŠธ ๋งŒ๋“ค์–ด ๋ณด๋Š”๊ฒŒ ์‹ค๋ ฅ ํ–ฅ์ƒ์— ์ œ์ผ ๋„์›€ ๋˜๊ฒ ์ง€๋งŒ ํด๋ก  ์ฝ”๋”ฉ์„ ํ†ตํ•ด ์–ป๋Š” ๊ฒƒ๋„ ๋งŽ๋‹ค. ์•„ ์ด ๋ถ€๋ถ„์€ ์ด๋Ÿฐ์‹์œผ๋กœ ํ•  ์ˆ˜๋„ ์žˆ๊ตฌ๋‚˜ ๋” ํŽธํ•˜๋‹ค ๋‹ค์Œ์— ์ด๋ ‡๊ฒŒ ํ•ด๋ด์•ผ์ง€๋ผ๋Š” ์ƒ๊ฐ๋„ ๋งŽ์ด ํ•  ์ˆ˜ ์žˆ์—ˆ๋‹ค. ๋ฌด์—‡๋ณด๋‹ค ์ด๋ฒˆ ๊ฐ•์˜๋ฅผ ํ†ตํ•ด ์–ป์€ ๊ฐ€์žฅ ํฐ ์ˆ˜ํ™•์€ ๋‹ค์–‘ํ•œ JS ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์•Œ๊ฒŒ ๋๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. ๋‹ค์Œ์— ํ”„๋กœ์ ํŠธํ•  ๋•Œ ๋นจ๋ฆฌ ์จ๋จน์–ด๋ณด๊ณ  ์‹ถ๋‹ค.๐Ÿ˜†๐Ÿ˜‡

 


 

๋ณธ ํฌ์ŠคํŒ…์€ ํŒจ์ŠคํŠธ์บ ํผ์Šค ํ™˜๊ธ‰ ์ฑŒ๋ฆฐ์ง€ ์ฐธ์—ฌ๋ฅผ ์œ„ํ•ด ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

 

#ํŒจ์ŠคํŠธ์บ ํผ์Šค

#ํŒจ์บ ์ฑŒ๋ฆฐ์ง€

#์ง์žฅ์ธ์ธ๊ฐ•

#์ง์žฅ์ธ์ž๊ธฐ๊ณ„๋ฐœ

#ํŒจ์ŠคํŠธ์บ ํผ์Šคํ›„๊ธฐ

#ํ•œ_๋ฒˆ์—_๋๋‚ด๋Š”_ํ”„๋ก ํŠธ์—”๋“œ_๊ฐœ๋ฐœ_์ดˆ๊ฒฉ์ฐจ_ํŒจํ‚ค์ง€_Online

 

https://bit.ly/37BpXiC

 

ํŒจ์ŠคํŠธ์บ ํผ์Šค [์ง์žฅ์ธ ์‹ค๋ฌด๊ต์œก]

ํ”„๋กœ๊ทธ๋ž˜๋ฐ, ์˜์ƒํŽธ์ง‘, UX/UI, ๋งˆ์ผ€ํŒ…, ๋ฐ์ดํ„ฐ ๋ถ„์„, ์—‘์…€๊ฐ•์˜, The RED, ๊ตญ๋น„์ง€์›, ๊ธฐ์—…๊ต์œก, ์„œ๋น„์Šค ์ œ๊ณต.

fastcampus.co.kr