Jump to content

CSS Code for Delaying Text and Button on cover page

Go to solution Solved by tuanphan,

Recommended Posts

Hello friends!

I would like to delay the appearance of the Welcome text and Enter button on my cover page, and I would like to stagger them if possible. For example the Welcome text can appear after 3 seconds and the Button appears after 4 seconds, or something similar. 

Does anyone have a CSS code snippet that could work for this?

Link to comment

@payper-plains Here's an animation I just built with CSS based on what described. 

Add the code I wrote to the Custom CSS panel. You’ll find the Custom CSS panel in Website > Utilities > Website Tools > Custom CSS.

#collection-5661127ce4b0ae1476ab058b .sqs-slice-group .group-copy {
    opacity: 0;
    animation: fadeIn 1s;
    animation-delay: 3s;
    animation-fill-mode: forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#collection-5661127ce4b0ae1476ab058b .sqs-slice-group .group-links {
    opacity: 0;
    animation: fadeIn 2s;
    animation-delay: 4s;
    animation-fill-mode: forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

Let me know how it goes. Thanks!

Edited by Lesum

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

Link to comment
  • Solution
On 8/22/2023 at 8:06 AM, payper-plains said:

Thanks for the code! I just realized that custom code does not work on cover pages. Which is stated on the CSS panel. Do you perhaps know a workaround? 

Custom CSS box won't affect Cover Page. You need add to Cover Page Settings

First hover on Cover Page on Main Navigation (or Not Linked) > A gear icon will appear on right > Click on it > Click Advanced > Paste the code to right box

<style>
  .sqs-slice-group .group-copy {
    opacity: 0;
    animation: fadeIn 1s;
    animation-delay: 3s;
    animation-fill-mode: forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.sqs-slice-group .group-links {
    opacity: 0;
    animation: fadeIn 2s;
    animation-delay: 4s;
    animation-fill-mode: forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 8/25/2023 at 6:07 AM, payper-plains said:

@tuanphan After adding the code, I noticed on safari and chrome when the cover page loads there is a very brief second where the paper plane animation starts higher on the page and the starts in the correct position. Is this caused by the code?

Here is the page again for reference www.payperplains.com

It looks fine on my Chrome. Can you take a screenshot or quick video on your end?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Maybe it's because the code hasn't loaded yet. The code inserted in the Page Header will usually load 1-2 seconds slower than the page content loads so I don't have any idea how to handle this, In addition to using standard page, using CSS code to remove header/footer, and the code above we can move to the Custom CSS box, instead of Page Header.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (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.