Answers for "css fade in on scroll"

1

css scroll fade in

<div class="About-Text fade-in" charset=UTF-16>
           Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vitae totam necessitatibus ex, illo esse voluptas nulla corporis aspernatur assumenda at, officia reiciendis. Distinctio aliquid repellat, exercitationem, vitae suscipit quo quae fuga quaerat quia, repudiandae dolores illo ea id totam. Ad perferendis debitis recusandae. Incidunt vitae quae, saepe voluptatum voluptas accusamus error dolorem ipsam iusto. Nobis totam eius quos atque rem illum voluptatem, voluptas doloremque cumque molestiae eveniet molestias porro sit cupiditate placeat delectus maxime, eligendi labore nam facilis doloribus! Corporis, tenetur saepe. Quas soluta temporibus eaque sit cumque iusto est amet numquam, quae optio maxime, neque sed nihil omnis reprehenderit?
        </div>



        <script>
            const faders = document.querySelectorAll('.fade-in');

            const appearOptions = { 
                threshold:1
            };

            const appearOnScroll = new IntersectionObserver(function(entries,appearOnScroll) {
                entries.forEach(entry =>
                {
                    if(entry.isIntersecting)
                    {
                        entry.target.classList.remove('appear');
                        entry.target.classList.remove('disappear');
                        entry.target.classList.add('appear');
                    }
                    else
                    {
                        entry.target.classList.remove('appear');
                        entry.target.classList.remove('disappear');
                        entry.target.classList.add('disappear');
                    }
                })
            },
            appearOptions); 
            
            faders.forEach(fader =>{
                appearOnScroll.observe(fader);
            });
        </script>
Posted by: Guest on November-04-2021
6

aos js

CSS
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">

JS
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>

INITIALIZE AOS:
<script>
  AOS.init();
</script>
Posted by: Guest on May-04-2020
0

scrolling animation css

.inline-photo {
  border: 1em solid #fff;
  border-bottom: 4em solid #fff;
  border-radius: .25em;
  box-shadow: 1em 1em 2em .25em rgba(0,0,0,.2);
  margin: 2em auto;
  opacity: 0;
  transform: translateY(4em) rotateZ(-5deg);
  transition: transform 4s .25s cubic-bezier(0,1,.3,1),
              opacity .3s .25s ease-out;
  max-width: 600px;
  width: 90%;
  will-change: transform, opacity;
}
Posted by: Guest on December-02-2020
0

aos css animation

<div data-aos="zoom-in-right"></div>
Posted by: Guest on July-19-2020

Browse Popular Code Answers by Language