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
  • 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

Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Keyword Highlighter
If you find my answer fit your need, 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.