Jump to content

Help with adding a gradient animation to a specific section

Go to solution Solved by tuanphan,

Recommended Posts

Hey,

I've been trying to add a gradient background animation to a specific section of my Squarespace site. I've tried different variations of code that I found in forums but nothing seems to be working.

I'm specifically looking to add the animated background to the first section of my home page. 'Purpose meets play section'

using the colour code: 

#F28F00 #E9600B #D93175 #F28F00

This is my site: https://www.nubicollective.com/

Any assistance would be greatly appreciated, thank you!

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

Top Posters In This Topic

  • Solution

I see you figured it out with this CSS code?

[data-section-id="66b8f7ce3739be02330d0794"] .section-background {
    background: linear-gradient(45deg, #f28f00, #e9600b, #d93175, #d93175);
    background-size: 600% 100%;
    animation: gradient 3s linear infinite;
    animation-direction: alternate;
}
@keyframes gradient {
    0% {
        background-position: 0%
    }

    100% {
        background-position: 100%
    }
}

 

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
  • 2 weeks later...

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.