Gradient background | Using CSS

To create a gradient background we have to use the background-image property and set the gradient in CSS like this:
Gradient background using CSS
Gradient background using CSS


CSS Code:
            <style>
        body{
        height:100%;
        background-attachment:fixed;
        background-image: linear-gradient(top #000 #999);
        background-image: -moz-linear-gradient(top, #000, #666);
        background-image: -ms-linear-gradient(top, #000, #666);
        background-image: -o-linear-gradient(top, #000, #666);
        background-image: -webkit-gradient(linear, 0% 0%, 0% 100%,
        from(#000), to(#999));}
        </style>

    

Comments

Post a Comment

Thanks for Visiting for any questions or suggestions please comment below
Cheers,

Popular posts from this blog

How CSS3 Works