不知道為啥誒,老說我寫錯了
<!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:linear-gradient(to?top?right,red,orange,yellow,green,blue,indigo,violet);
}?
</style>
</head>?
<body>
<p>右下角向左上角的線性漸變背景</p>
</body>
</html>
2017-03-07
到左上角應該是to top left
background-image:linear-gradient(to?top left,red,orange,yellow,green,blue,indigo,violet);
}?
希望幫助到你!