Last Updated: February 25, 2016
·
22.26K
· cassiocardoso

Full Page Gradient Background

This is a simple snippet to make a full page gradient background using CSS. All you need is to write a simple CSS file with this code:


html {
    background: #red; /* fallback color */
    background: linear-gradient( to bottom, #red, #blue);
    background-repeat: no-repeat;
    background-size: cover;
    width: 100%;
    height: 100%;
}

And link it in your main html/php file!