<div class="gradient"></div>
body {
    margin: 0;
}

.gradient {
    background: linear-gradient(to right, green, blue);  
    height: 100px;
} 

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.