<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Gradient</title>
<style type="text/css">
p {
width: 400px;
height: 150px;
line-height: 150px;
text-align:center;
color: #000;
font-size:24px;
background-image:radial-gradient(to top left,red,orange,yellow,green,blue,indigo,violet)
}
</style>
</head>
<body>
<p>右下角向左上角的线性渐变背景</p>
</body>
</html>
background-image:radial-gradient(to top left,red,orange,yellow,green,blue,indigo,violet)
兄弟,径向就是圆形的啊,不用加方向了。不是线性渐变。。
background-image:radial-gradient(red,orange,yellow,green,blue,indigo,violet);
background-image:linear-gradient(to bottom right , red, orange,yellow,green,blue,indigo,violet);