½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
happycgi
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > CSS > ±âŸȿ°ú > GSAP ScrollTrigger + TextPlugin- ½ºÅ©·Ñ Æ®¸®°Å + ÅؽºÆ® Ç÷¯±×ÀÎ »ó¼¼Á¤º¸
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
javascript
PHP
ASP
css
HTML
mysql
jquery
image
API
Mobile
¸Þ´º
slide
°Ô½ÃÆÇ
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
GSAP ScrollTrigger + TextPlugin- ½ºÅ©·Ñ Æ®¸®°Å + ÅؽºÆ® Ç÷¯±×ÀÎ
¼Ò½ºÅë°èÁ¤º¸ ¿À·ù½Å°í ¹× ¹®ÀÇ
ÇØÇÇÆÀ
³×ƼÁð
Æ®À§ÅÍ·Î º¸³»±â ÆäÀ̽ººÏÀ¸·Î º¸³»±â
¼Ò½ººÐ·ù ±âŸȿ°ú
´Ù¿î·Îµå Ƚ¼ö 11 ȸ
°£´Ü¼³¸í ½ºÅ©·Ñ Æ®¸®°Å + ÅؽºÆ® Ç÷¯±×ÀÎ
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
ȨÆäÀÌÁö¹Ù·Î°¡±â ¼Ò½º´Ù¿î·Îµå µ¥¸ð ¹Ì¸®º¸±â ½ºÅ©·¦Çϱâ

GSAP ScrollTrigger + TextPlugin- GSAP ½ºÅ©·Ñ Æ®¸®°Å + ÅؽºÆ® Ç÷¯±×ÀÎ
½ºÅ©·Ñ½Ã ÅؽºÆ®°¡ º¯ÇÕ´Ï´Ù. ¸ÞÀÎ µðÀÚÀÎÀ̳ª ´ÙÀ̳ª¹ÍÇÑ µðÀÚÀÎÀ» ¿øÇϽŴٸé È°¿ëÇϽøé ÁÁÀ»°Å  °°½À´Ï´Ù.

HTML ±¸Á¶

<section>

  <h1>

    <span>SCROLL</span>

    <span>FOR</span>

    <span>MORE</span>

  </h1>

</section>


<section></section>



CSS ¼Ò½º

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');


html, body {

  font-family: "Open Sans", serif;

  font-optical-sizing: auto;

  font-weight: 800;

  font-style: normal;

  font-variation-settings: "wdth" 800;

  color:#111;

}


section {

  width:100%;

  height:100vh;

  display:flex;

  align-items:center;

  justify-content:center;

}


h1 {

  width:32vw;

}


h1 span {

  display:block;

  font-size:7vw;

  position:relative;

  margin-bottom:3vw;

  padding:0 1vw;

  width: fit-content;

  --bg:transparent;

}


h1 span:after {

  z-index:-1;

  border-radius:1vw;

  content: "";

  width:100%;

  height:33%;

  left:0;

  bottom:0;

  position: absolute;

  background:var(--bg);

}



JS ¼Ò½º

const arr1 = ["1bb28c","e86a58","fed45b","9bc7c5"]

const arr2 = [...arr1]

const arr3 = [...arr1]

const words2 = ["DON’T","BE","EVIL"]

const words3 = ["NICE TO","MEET","YOU"]

const spans = document.querySelectorAll('h1 span')

const getHexFrom = (arr) => arr.splice( gsap.utils.random(0 ,arr.length-1, 1), 1)


const tl = gsap.timeline({

  defaults:{ ease:'none' },

  scrollTrigger:{

    trigger:'section',

    scrub:0,

    pin:'h1',

    start:'0 0',

    end:'100% 0'

  }

})


spans.forEach((span,i)=>{

  gsap.set(span,{'--bg':'#'+getHexFrom(arr1)})

  

  tl.add( gsap.to(span, { text:words2[i] }), i)

  tl.add( gsap.to(span, { '--bg':'#'+getHexFrom(arr2), duration:0.15 }), i)

  

  tl.add( gsap.to(span, { text:words3[i] }), i+3)

  tl.add( gsap.to(span, { '--bg':'#'+getHexFrom(arr3), duration:0.15 }), i+3)

})


 

³×ƼÁð ÀÇ°ß   ÀÌ¿ëÇϽŠÀÚ·áÀÇ Èı⸦ ÀÚÀ¯·Ó°Ô ÀÛ¼ºÇϼ¼¿ä. (»ó¾÷ÀûÀÎ ±¤°í ¹× µµ¹è¼º ±Û µîÀº »çÀüÅ뺸¾øÀÌ »èÁ¦µÉ ¼ö ÀÖ½À´Ï´Ù.)
³»¿ë ¾ÆÀ̵ð ÀÇ°ß³²±â±â
µî·ÏµÈ ÀÇ°ßÀÌ ¾ø½À´Ï´Ù.
1
À̸§
³»¿ë
:³×¸Â¾Æ¿ä: :È­³ª´Â±º¿ä: :Àá¿Í: :¿ì¿ïÇØ: :À̰ǾƳÄ: :¿ÕÇÏÇÏ: ¿Õ¿ôÀ½~ ³î·¥~
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
µµ¹è¹æÁöÅ°
 76265151 º¸ÀÌ´Â µµ¹è¹æÁöÅ°¸¦ ÀÔ·ÂÇϼ¼¿ä.