x
 
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
  height: 200px;
  background-color: red; /* 针对不支持渐变的浏览器 */
  background-image: linear-gradient(to bottom right, red, yellow);
}
</style>
</head>
<body>
<h1>线性渐变 - 对角线</h1>
<p>此线性渐变从左上开始为红色,然后过渡到黄色(到右下):</p>
<div id="grad1"></div>
</body>
</html>