x
 
<!DOCTYPE html>
<html>
<head>
<style>
#grad1 {
  height: 200px;
  background-image: linear-gradient(to bottom right, red , blue);
}
</style>
</head>
<body>
<h1>线性渐变 - 对角线</h1>
<p>此线性渐变从左上方开始。它从红色开始,过渡到蓝色:</p>
<div id="grad1"></div>
<p><b>注释:</b>Internet Explorer 9 以及更早的版本不支持渐变。</p>
</body>
</html>