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

GSAPÀ» ÀÌ¿ëÇÑ À̹ÌÁö ½½¶óÀ̵åÀÔ´Ï´Ù.

½ºÅ©·ÑÇϰųª ¹öÆ°À» Ŭ¸¯ÇÏ¿© ¼ø¼­¸¦ º¯°æÇÒ ¼ö ÀÖ°í ¹«ÇÑÀ¸·Î ½½¶óÀ̵åµË´Ï´Ù.

»çÀÌÆ®¸¦ ±¸¼ºÇÒ ¶§ ´Ù¾çÇÑ ¹æ½ÄÀ¸·Î »ç¿ëÇϱâ ÁÁ½À´Ï´Ù.

 

 

HTML ±¸Á¶

<div class="gallery">

<ul class="cards">

<li>0</li>

<li>1</li>

<li>2</li>

<li>3</li>

<li>4</li>

<li>5</li>

<li>6</li>

<li>7</li>

<li>8</li>

<li>9</li>

<li>10</li>

<li>11</li>

<li>12</li>

<li>13</li>

<li>14</li>

<li>15</li>

<li>16</li>

<li>17</li>

<li>18</li>

<li>19</li>

</ul>

<div class="actions">

<button class="prev">Prev</button>

<button class="next">Next</button>

</div>

</div>



CSS ¼Ò½º

* {

box-sizing: border-box;

}

body {

background: #111;

min-height: 100vh;

padding: 0;

margin: 0;

}

.gallery {

position: absolute;

width: 100%;

height: 100vh;

overflow: hidden;

}


.cards {

position: absolute;

width: 14rem;

height: 18rem;

top: 40%;

left: 50%;

transform: translate(-50%, -50%);

}


.cards li {

list-style: none;

padding: 0;

margin: 0;

width: 14rem;

height: 18rem;

text-align: center;

line-height: 18rem;

font-size: 2rem;

font-family: sans-serif;

background-color: #9d7cce;

position: absolute;

top: 0;

left: 0;

border-radius: 0.8rem;

}


.actions {

position: absolute;

bottom: 25px;

left: 50%;

transform: translateX(-50%);

}


button {

  display:inline-block;

  outline: none;

  border: none;

  padding: 8px 14px;

  background: #414141;

  background-image: -webkit-linear-gradient(top, #575757, #414141);

  background-image: -moz-linear-gradient(top, #575757, #414141);

  background-image: -ms-linear-gradient(top, #575757, #414141);

  background-image: -o-linear-gradient(top, #575757, #414141);

  background-image: linear-gradient(to bottom, #575757, #414141);

  text-shadow: 0px 1px 0px #414141;

  -webkit-box-shadow: 0px 1px 0px 414141;

  -moz-box-shadow: 0px 1px 0px 414141;

  box-shadow: 0px 1px 0px 414141;

  color: #ffffff;

  text-decoration: none;

  margin: 0 auto 10px;

  -webkit-border-radius: 4;

  -moz-border-radius: 4;

  border-radius: 4px;

  padding: 12px 25px;

  font-family: "Signika Negative", sans-serif;

  text-transform: uppercase;

  font-weight: 600;

  cursor: pointer;

  font-size: 13px;

  line-height: 18px;

}


button:hover {

  background: #57a818;

  background-image: -webkit-linear-gradient(top, #57a818, #4d9916);

  background-image: -moz-linear-gradient(top, #57a818, #4d9916);

  background-image: -ms-linear-gradient(top, #57a818, #4d9916);

  background-image: -o-linear-gradient(top, #57a818, #4d9916);

  background-image: linear-gradient(to bottom, #57a818, #4d9916);

  text-shadow: 0px 1px 0px #32610e;

  -webkit-box-shadow: 0px 1px 0px fefefe;

  -moz-box-shadow: 0px 1px 0px fefefe;

  box-shadow: 0px 1px 0px fefefe;

  color: #ffffff;

  text-decoration: none;

}


button {

  font-size: 20px;

  font-weight: 400;

}


a {

  color: #88ce02;

  text-decoration: none;

}

a:hover {

  text-decoration: underline;

}



JS ¼Ò½º

gsap.registerPlugin(ScrollTrigger);


let iteration = 0; // gets iterated when we scroll all the way to the end or start and wraps around - allows us to smoothly continue the playhead scrubbing in the correct direction.


const spacing = 0.1,    // spacing of the cards (stagger)

snap = gsap.utils.snap(spacing), // we'll use this to snap the playhead on the seamlessLoop

cards = gsap.utils.toArray('.cards li'),

seamlessLoop = buildSeamlessLoop(cards, spacing),

scrub = gsap.to(seamlessLoop, { // we reuse this tween to smoothly scrub the playhead on the seamlessLoop

totalTime: 0,

duration: 0.5,

ease: "power3",

paused: true

}),

trigger = ScrollTrigger.create({

start: 0,

onUpdate(self) {

if (self.progress === 1 && self.direction > 0 && !self.wrapping) {

wrapForward(self);

} else if (self.progress < 1e-5 && self.direction < 0 && !self.wrapping) {

wrapBackward(self);

} else {

        scrub.vars.totalTime = snap((iteration + self.progress) * seamlessLoop.duration());

scrub.invalidate().restart(); // to improve performance, we just invalidate and restart the same tween. No need for overwrites or creating a new tween on each update.

self.wrapping = false;

}

},

end: "+=3000",

pin: ".gallery"

});


function wrapForward(trigger) { // when the ScrollTrigger reaches the end, loop back to the beginning seamlessly

iteration++;

trigger.wrapping = true;

trigger.scroll(trigger.start + 1);

}

 


.
.
.
ÀÚ¼¼ÇÑ ¼Ò½º´Â µ¥¸ð »çÀÌÆ®³ª ÷ºÎÆÄÀÏÀ» ÅëÇØ È®ÀÎ °¡´ÉÇÕ´Ï´Ù.


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