Last Updated: February 25, 2016
·
25.05K
· 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!

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

The website is part of the attack surface, not only the API behind it. Every script, iframe, and tag on a public page is code that did not go through the same review as the backend.

Security insights from Cside