https://www.w3schools.com/css/tryit.asp?filename=trycss3_gradient-linear <!DOCTYPE html> <html> <head> <style> #grad1 { height: 300px; background-color: red; /* For browsers that do not support gradients */ background-image: linear-gradient(red, yellow); /* Standard syntax (must be last) */ } </style> </head> <body> <h1>Linear Gradient - Top to Bottom</h1> <p>This linear gradient starts at the top. It starts red, transitioning to yellow:</p> <div id="grad1"></div> <p><strong>Note:</strong> Internet Explorer 9 and earlier versions do not support gradients.</p> </body> </html> |