css3 Gradient背景,css3gradient背景

來源:互聯網
上載者:User

css3 Gradient背景,css3gradient背景

css3的gradient分為兩種:線性漸層(linear)和放射狀漸層(radial)。

一、線性漸層linear-gradient

linear-gradient([設定方向],[設定開始顏色],[設定多種過度顏色],[設定結束顏色])

參數:

第一個參數:指定漸層方向,可以用“角度”的關鍵字或“英文”來表示:

第一個參數預設:180deg,等同於“to bottom”。

後面的顏色至少有2個,即開始顏色和結束顏色。

舉例:

<style type="text/css">p{    width: 300px;    height: 100px;    background-image:-webkit-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet);}</style><p>從左至右線性漸層背景</p>

二、放射狀漸層radial-gradient

待續

 

 

 

大漠寫的css3 gradient

http://www.w3cplus.com/content/css3-gradient

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.