Jump to content

Fade in text animation?

Recommended Posts

Site URL: https://www.brayand.co/new-services

In each section I would like the text to fade in as soon as the section is reached. 
I added some CSS for each section, but instead of fading in once the section is reached, it fades in on the page load. 

Here is the CSS:

section[data-section-id="62e2bac3984277106d805442"]
.sqs-block-html, .Intro .sqs-row {
  animation: fade-text-anim 2s ease;
}


@keyframes fade-text-anim {
  0% {
    opacity: 0;
    transform: translate3d(0,30px,0);
  }
  25% {
    opacity: 0;
    transform: translate3d(0,30px,0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
}


How can I edit this so it only fades in once the section is reached?

Link to comment
  • Replies 2
  • Views 731
  • Created
  • Last Reply

Top Posters In This Topic

4 hours ago, jesseatkinson said:

Site URL: https://www.brayand.co/new-services

In each section I would like the text to fade in as soon as the section is reached. 
I added some CSS for each section, but instead of fading in once the section is reached, it fades in on the page load. 

Here is the CSS:

section[data-section-id="62e2bac3984277106d805442"]
.sqs-block-html, .Intro .sqs-row {
  animation: fade-text-anim 2s ease;
}


@keyframes fade-text-anim {
  0% {
    opacity: 0;
    transform: translate3d(0,30px,0);
  }
  25% {
    opacity: 0;
    transform: translate3d(0,30px,0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
}


How can I edit this so it only fades in once the section is reached?

In order to capture when the section is reach on your viewport, we need to implement some js code to observer it

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.