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

GSAP ÀÌ¿ëÇÑ ÅؽºÆ® È¿°úÀÔ´Ï´Ù.

½ºÅ©·Ñ, È£¹ö ½Ã È¿°ú°¡ °¢°¢ ´Ù¸£¸ç ¸ÞÀÎ ÆäÀÌÁö µîµî »çÀÌÆ®¿¡ µ¿ÀûÀÎ È¿°ú¸¦ ÁÖ±â ÁÁ½À´Ï´Ù.

 

 

HTML ±¸Á¶

<div class="container">

  <h1 class="text">TEXT EFFECT<span>WOAH</span></h1>

  <h1 class="text">GSAP<span>AND CLIPPING</span></h1>

  <h1 class="text">CRAZYYY<span>CRAZYYY</span></h1>

  <h1 class="text">HOVER ON ME<span><a href="https://stacksorted.com/text-effects/minh-pham" target="_blank">SOURCE</a></span></h1>

  <h1 class="text">LIKE THIS?<span><a href="https://twitter.com/juxtopposed" target="_blank">LET'S CONNECT</a></span></h1>

</div>



CSS ¼Ò½º

body {

  margin: 0;

  padding: 0;

  font-family: 'Poppins', sans-serif;

  background-color: #0D0D0D;

  margin: 10%;

}


.container {

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: flex-start;

  height: 200vh;

}


.text {

  font-size: 10vw;

  letter-spacing: -.01em;

  line-height: 100%;

  margin: 0;

  

  width: 100%;

  color: rgb(182, 182, 182, 0.2);

  background: linear-gradient(to right, #b6b6b6, #b6b6b6) no-repeat;

  -webkit-background-clip: text;

  background-clip: text;

  background-size: 0%;

  transition: background-size cubic-bezier(.1,.5,.5,1) 0.5s;

  


  border-bottom: 1px solid #2F2B28;

  

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  justify-content: center;

  position: relative;

}


span {

  position: absolute;

  width: 100%;

  height: 100%;

  background-color: #4246ce;

  color: #0D0D0D;

  

  clip-path: polygon(0 50%, 100% 50%, 100% 50%, 0 50%);

  transform-origin: center;

  transition: all cubic-bezier(.1,.5,.5,1) 0.4s;

  

  display: flex;

  flex-direction: column;

  justify-content: center;

}


.text:hover > span {

  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);

}


a {

  text-decoration: none;

  color: inherit;

}



JS ¼Ò½º

gsap.registerPlugin(ScrollTrigger);


const textElements = gsap.utils.toArray('.text');


textElements.forEach(text => {

  gsap.to(text, {

    backgroundSize: '100%',

    ease: 'none',

    scrollTrigger: {

      trigger: text,

      start: 'center 80%',

      end: 'center 20%',

      scrub: true,

    },

  });

});



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