Tom1464 Posted January 15 Posted January 15 Using the following code, I want to create a gradient background on my site using the following code. However, when inputting this into CSS it has no effect. section, section .content-wrapper, section .section-background { background: transparent !important; } #siteWrapper { background: linear-gradient(to bottom, #4B86B9, #B2B1BF, #F16351); background-size: 600% 100%; animation: gradient 16s linear infinite; animation-direction: alternate; } @keyframes gradient { 0% { background-position: 0%; } 100% { background-position: 100%; } } Any advice at all would be greatly appreciated as I am new to code. Thanks
Solution tuanphan Posted January 16 Solution Posted January 16 Change to this code section, section .section-border, section .section-background { background: transparent !important; } body { background: linear-gradient(to bottom, #4B86B9, #B2B1BF, #F16351); background-size: 600% 100%; animation: gradient 16s 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!)
Tom1464 Posted January 16 Author Posted January 16 One More thing, is there a way to make this apply for every section bar the top one? Thanks
tuanphan Posted January 18 Posted January 18 On 1/17/2024 at 12:08 AM, Tom1464 said: One More thing, is there a way to make this apply for every section bar the top one? Thanks You mean apply the code to top section only (all pages), and keep other sections on page not gradient? 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!)
Tom1464 Posted January 24 Author Posted January 24 On 1/18/2024 at 12:58 AM, tuanphan said: You mean apply the code to top section only (all pages), and keep other sections on page not gradient? Keep the top section with no gradient and the other sections the custom gradient background. Thanks
tuanphan Posted January 28 Posted January 28 On 1/25/2024 at 5:16 AM, Tom1464 said: Keep the top section with no gradient and the other sections the custom gradient background. Thanks This will require to check site, can you share site url? 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!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment