Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <style> #grad1 { height:200px; background: -webkit-linear-gradient(left top, red , blue); /* For Safari */ background: -o-linear-gradient(bottom right, red, blue); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(bottom right, red, blue); /* For Firefox 3.6 to 15 */ background: linear-gradient(to bottom right, red , blue); /* Standard syntax (must be last) */ } </style> </head> <body> <h3>Linear Gradient - Diagonal</h3> <p>This linear gradient starts at top left. It starts red, transitioning to blue:</p> <div id="grad1"></div> <p><strong>Note:</strong> Internet Explorer 9 and earlier versions do not support gradients.</p> </body> </html>
Result:
W3Schools.com - Try it yourself