Search code examples
csscolorsbackgroundradix

Web Markup, background color set as base


so I'm having a slight issue. I need some way to get my background color of RGB(151,151,151) to be set as a base for the preceding code. I'll copy it down below

body {
    background-image: url(sd_back2.jpg);
    background: -webkit-radial-gradient(circle closest-corner at 40% 70% , #ffffff 15%, rgba(151,151,151,0.5) 50% );
    background: -webkit-radial-gradient (circle closest-corner at 80% 40% , #ffffff 15%, rgba(0,0,0,0) 30% );
    background: -webkit-radial-gradient ( closest-side at 10% 20% , #ffffff 20%, rgba(0,0,0,0) 45% );
    background: -webkit-radial-gradient (farthest-side at 90% 10% , #ffffff 15%, rgba(0,0,0,0) 40% );
    background-color

If you see any other issues please let me know thanks.


Solution

  • In order to achieve the effects you would need to group the background image and radial gradients together into a background

    try this:

    body {
        background: url(sd_back2.jpg),
            radial-gradient(circle closest-corner at 40% 70%, white 15%, rgba(151, 151, 151, 0.5) 50%),
            radial-gradient(closest-corner at 80% 40%, white 15%, rgba(0, 0, 0, 0) 30%),
            radial-gradient(closest-side at 10% 20%, white 20%, rgba(0, 0, 0, 0) 45%),
            radial-gradient(5% 5% at 90% 10%, white 15%, rgba(0, 0, 0, 0) 40%);
        background-color: rgb(151,151,151);
    }
    

    this will combine all the effects instead of them overwriting each other.