徑向漸變

2018-06-06 10:52 更新

語法: background:radial-gradient( center,shape,size,star- color,... ) 樣式一: 默認方式以中心角開始到最遠角。

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body>
<div style="margin: 15px auto; width: 80px;height: 40px; background: radial-gradient(red,blue,yellow); class="change"> s </div> <hr /> <div style="margin: 15px auto; width: 80px;height: 80px; background: -webkit-radial-gradient(20% 30%,closest-side, red,blue,yellow); class="change">     靠近的邊 </div> <hr /> <div style="margin: 15px auto; width: 80px;height: 80px; background: -webkit-radial-gradient(20% 30%,closest-corner, red,blue,yellow); class="change">     靠近的角 </div> <hr /> <div style="margin: 15px auto; width: 80px;height: 40px; background: -webkit-radial-gradient(circle, red,blue,yellow); class="change"> s </div> </body> </html>

以上內容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號