在index.html中的标签中,输入css代码: div { width: 200px; height: 150px; background: linear-gradient(red, blue); } 默认是上下渐变