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

  1. Beautiful gradient. It seems I used this some time in past. Not in the memory though!

    ReplyDelete

Post a Comment

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

Check out

CSS Sprites | What are They?

Login form | Using CSS3

Remove Scrollbars from syntaxhighlighter

Adding a button in HTML | styling a button

HTML5 Semantic Tags | What do they mean

How to remove plus and minus characters from input type number

HTML5 | LocalStorage

jQuery Resources | Support and tutorial help

How CSS3 Works