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


¸¶¿ì½º ½ºÅ©·Ñ ½Ã Àû¿ëµÇ´Â ÅؽºÆ®, À̹ÌÁöÈ¿°úÀÔ´Ï´Ù.
ÀÀ¿ëÇÏ¿© ´Ù¾çÇÑ ¿¹Á¦¸¦ ¸¸µé ¼ö


HTML ±¸Á¶

<div class='container'>

  <h2 class="fadeup">Cool cool cool</h2>

  <div class='reveal'>

    <div class="image-wrap">

      <img src='https://images.unsplash.com/photo-1496865534669-25ec2a3a0fd3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=668&q=80'>

    </div>

  </div>

</div>

<div class='container'>

  <h2 class="fadeup">Cool cool cool</h2>

  <div class='reveal'>

    <div class="image-wrap">

      <img src='https://images.unsplash.com/photo-1493552152660-f915ab47ae9d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=668&q=80'>

    </div>

  </div>

</div>

<div class='container'>

  <h2 class="fadeup">Cool cool cool</h2>

  <div class='reveal'>

    <div class="image-wrap">

      <img src='https://images.unsplash.com/photo-1496198253360-4c44aa485f6c?ixlib=rb-1.2.1&auto=format&fit=crop&w=668&q=80'>

    </div>

  </div>

</div>

<div class='container'>

  <h2 class="fadeup">Cool cool cool</h2>

  <div class='reveal'>

    <div class="image-wrap">

      <img src='https://images.unsplash.com/photo-1494058303350-0bd5a9ecc5d3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=668&q=80'>

    </div>

  </div>

</div>

<div class="credit"><a href="https://thisisadvantage.com" target="_blank">Made by Advantage</a></div>



CSS ¼Ò½º

.container {

  display: grid;

  place-items: center;

  height: 100vh;

  width: 100%;

  position: relative;

}


.credit {

  position: fixed;

  top: 20px;

  right: 20px;

  font-family: Termina, sans-serif;

  font-weight: 800;

  font-size: 0.7rem;

}


.credit a {

  color: #1a292c;

  text-transform: lowercase;

}


.container:nth-child(2) {

  background: #3c564f;

}

.container:nth-child(1) {

  background: #b69187;

}

.container:nth-child(4) {

  background: #bcb8ad;

}

.container:nth-child(3) {

  background: #b6916d;

}


img {

  height: 100%;

  width: auto;

  max-width: 75vw;

  object-fit: contain;

}


h2 {

  font-family: Termina, sans-serif;

  font-weight: 800;

  text-transform: uppercase;

  -webkit-text-stroke: 2px white;

  text-stroke: 2px white;

  color: transparent;

  font-size: clamp(3rem, 10vw, 6rem);

  position: absolute;

  top: 25%;

  left: 5%;

  width: 90%;

  height: 50%;

  z-index: 99;

  display: grid;

  place-items: center;

}


body:not(.no-js) .image-wrap {

  transition: 1s ease-out;

  transition-delay: 0.2s;

  position: relative;

  width: auto;

  height: 80vh;

  overflow: hidden;

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

  visibility: hidden;

}


body:not(.no-js) .image-wrap img {

  transform: scale(1.3);

  transition: 2s ease-out;

}


body:not(.no-js) .animating .image-wrap {

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

  visibility: visible;

  transform: skewY(0);

}


body:not(.no-js) .animating img {

  transform: scale(1);

  transition: 4s ease-out;

}


body:not(.no-js) .fadeup {

  opacity: 0;

  transition: 0.4s ease-out;

  transform: translateY(40px);

}


body:not(.no-js) .fading-up {

  opacity: 1;

  transition: 1s ease-out;

  transform: translateY(0px);

  transition-delay: 0.7s;

}



JS ¼Ò½º

document.addEventListener("DOMContentLoaded", function () {

  const options = {

    root: null,

    rootMargin: "0px",

    threshold: 0.4

  };


  // IMAGE ANIMATION


  let revealCallback = (entries) => {

    entries.forEach((entry) => {

      let container = entry.target;


      if (entry.isIntersecting) {

        console.log(container);

        container.classList.add("animating");

        return;

      }


      if (entry.boundingClientRect.top > 0) {

        container.classList.remove("animating");

      }

    });

  };


  let revealObserver = new IntersectionObserver(revealCallback, options);


  document.querySelectorAll(".reveal").forEach((reveal) => {

    revealObserver.observe(reveal);

  });


  // TEXT ANIMATION


  let fadeupCallback = (entries) => {

    entries.forEach((entry) => {

      let container = entry.target;

      container.classList.add("not-fading-up");


      if (entry.isIntersecting) {

        container.classList.add("fading-up");

        return;

      }


      if (entry.boundingClientRect.top > 0) {

        container.classList.remove("fading-up");

      }

    });

  };


  let fadeupObserver = new IntersectionObserver(fadeupCallback, options);


  document.querySelectorAll(".fadeup").forEach((fadeup) => {

    fadeupObserver.observe(fadeup);

  });

});

 

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