1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<!doctype html> <html> <head> <meta charset="utf-8"> <style> #gradient { width: 400px; height: 300px; background-image: linear-gradient(to right, yellow 0%, blue 70%, green 70%, green 100%); } </style> </head> <body> <div id="gradient"></div> </body> </html>