ToldTales Posted December 2, 2021 Share Posted December 2, 2021 (edited) Hi, I'm currently working on building a site. I wanted to use this code to have an animated gradient background. body { margin:0; } .wrapper { width: 100%; height: 100%; position: absolute; background: linear-gradient(60deg,#fffdf8, #ffcae0); background-size: 600% 100%; animation: gradient 5s linear infinite; animation-direction: alternate; } @keyframes gradient { 0% {background-position: 0%} 100% {background-position: 100%} } I've pasted in to 'Custom CSS' section but can't see it working. Do I need to add some more code for it to work? This is the link to the css I want to use. https://codepen.io/redstapler/pen/LMyLxP Thanks in advance. Edited December 2, 2021 by ToldTales Missed a link out Beyondspace 1 Link to comment
Beyondspace Posted December 2, 2021 Share Posted December 2, 2021 3 hours ago, ToldTales said: Hi, I'm currently working on building a site. I wanted to use this code to have an animated gradient background. body { margin:0; } .wrapper { width: 100%; height: 100%; position: absolute; background: linear-gradient(60deg,#fffdf8, #ffcae0); background-size: 600% 100%; animation: gradient 5s linear infinite; animation-direction: alternate; } @keyframes gradient { 0% {background-position: 0%} 100% {background-position: 100%} } I've pasted in to 'Custom CSS' section but can't see it working. Do I need to add some more code for it to work? This is the link to the css I want to use. https://codepen.io/redstapler/pen/LMyLxP Thanks in advance. Do you want to set this effect on an unique section or entire your page? Kindly share your site with the protected password to check it together ToldTales 1 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, Lightbox Studio pluginIf 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
ToldTales Posted December 2, 2021 Author Share Posted December 2, 2021 It would be great to have it as the entire page. https://vuvuzela-mackerel-m37a.squarespace.com password: cssbackground Thanks for your help Link to comment
Beyondspace Posted December 4, 2021 Share Posted December 4, 2021 On 12/3/2021 at 2:09 AM, ToldTales said: It would be great to have it as the entire page. https://vuvuzela-mackerel-m37a.squarespace.com password: cssbackground Thanks for your help Is it the result you want to achieve? gradient background.mp4 Try adding to Home > Design > Custom Css section, section .content-wrapper, section .section-background { background: transparent !important; } #siteWrapper { background: linear-gradient(45deg,#F17C58, #E94584, #24AADB , #27DBB1,#FFDC18, #FF3706); background-size: 600% 100%; animation: gradient 16s linear infinite; animation-direction: alternate; } @keyframes gradient { 0% {background-position: 0%;} 100% {background-position: 100%;} } Let me know how it works on your site Support me by pressing 👍 if this useful for you happyscone 1 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, Lightbox Studio pluginIf 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
happyscone Posted January 21, 2022 Share Posted January 21, 2022 (edited) On 12/4/2021 at 3:38 AM, bangank36 said: Is it the result you want to achieve? gradient background.mp4 1.62 MB · 3 downloads Try adding to Home > Design > Custom Css section, section .content-wrapper, section .section-background { background: transparent !important; } #siteWrapper { background: linear-gradient(45deg,#F17C58, #E94584, #24AADB , #27DBB1,#FFDC18, #FF3706); background-size: 600% 100%; animation: gradient 16s linear infinite; animation-direction: alternate; } @keyframes gradient { 0% {background-position: 0%;} 100% {background-position: 100%;} } Let me know how it works on your site Support me by pressing 👍 if this useful for you hey @bangank36 how can I do this to target just one section of a page? I am trying to wrap the CSS you provided within a data section ID, and then it stops working. Thanks in advance! Edited January 21, 2022 by happyscone Link to comment
tuanphan Posted January 25, 2022 Share Posted January 25, 2022 On 1/22/2022 at 5:49 AM, happyscone said: how can I do this to target just one section of a page? I am trying to wrap the CSS you provided within a data section ID, and then it stops working. Thanks in advance! try this CSS [data-section-id="id here id here"] { &, .content-wrapper, .section-background { background-color: transparent !important; } .section-background { background: linear-gradient(45deg,#F17C58, #E94584, #24AADB , #27DBB1,#FFDC18, #FF3706); background-size: 600% 100%; animation: gradient 16s linear infinite; animation-direction: alternate; } } @keyframes gradient { 0% {background-position: 0%;} 100% {background-position: 100%;} } happyscone 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
happyscone Posted January 25, 2022 Share Posted January 25, 2022 33 minutes ago, tuanphan said: try this CSS [data-section-id="id here id here"] { &, .content-wrapper, .section-background { background-color: transparent !important; } .section-background { background: linear-gradient(45deg,#F17C58, #E94584, #24AADB , #27DBB1,#FFDC18, #FF3706); background-size: 600% 100%; animation: gradient 16s linear infinite; animation-direction: alternate; } } @keyframes gradient { 0% {background-position: 0%;} 100% {background-position: 100%;} } Thanks @tuanphan this worked! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment