CSS函数linear-gradient()的用法
使用linear-gradient()CSS函数将线性渐变设置为背景图像。您可以尝试运行以下代码以在CSS中实现linear-gradient()函数
示例
<!DOCTYPE html> <html> <head> <style> #demo { height: 200px; background: linear-gradient(green, orange, maroon); } </style> </head> <body> <p>Setting background as linear gradient.</p> <div id = "demo"></div> </body> </html>