css3 漸層效果

來源:互聯網
上載者:User

標籤:

複雜漸層產生器地址:http://www.colorzilla.com/gradient-editor/

背景漸層圖案地址:http://lea.verou.me/css3patterns/

 

eg:兩色線性漸層

background: #fcfcfc; /* Old browsers */
background: -moz-linear-gradient(top, #fcfcfc 0%, #ff0206 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fcfcfc), color-stop(100%,#ff0206)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fcfcfc 0%,#ff0206 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fcfcfc 0%,#ff0206 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fcfcfc 0%,#ff0206 100%); /* IE10+ */
background: linear-gradient(to bottom, #fcfcfc 0%,#ff0206 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=‘#fcfcfc‘, endColorstr=‘#ff0206‘,GradientType=0 ); /* IE6-9 */

 

eg:兩色放射狀漸層

background: #fcfcfc; /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover, #fcfcfc 0%, #ff0206 100%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#fcfcfc), color-stop(100%,#ff0206)); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover, #fcfcfc 0%,#ff0206 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover, #fcfcfc 0%,#ff0206 100%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover, #fcfcfc 0%,#ff0206 100%); /* IE10+ */
background: radial-gradient(ellipse at center, #fcfcfc 0%,#ff0206 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=‘#fcfcfc‘, endColorstr=‘#ff0206‘,GradientType=1 ); /* IE6-9 fallback on horizontal gradient */

 

eg:三色線性漸層

background: #fff2f2; /* Old browsers */
background: -moz-linear-gradient(top, #fff2f2 0%, #2e71f7 50%, #315263 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fff2f2), color-stop(50%,#2e71f7), color-stop(100%,#315263)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fff2f2 0%,#2e71f7 50%,#315263 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fff2f2 0%,#2e71f7 50%,#315263 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #fff2f2 0%,#2e71f7 50%,#315263 100%); /* IE10+ */
background: linear-gradient(to bottom, #fff2f2 0%,#2e71f7 50%,#315263 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=‘#fff2f2‘, endColorstr=‘#315263‘,GradientType=0 ); /* IE6-9 */

 

背景漸層圖案--之多八卦漸層(很有意思哦):

background:
radial-gradient(circle at 50% 59%, #D2CAAB 3%, #364E27 4%, #364E27 11%, rgba(54,78,39,0) 12%, rgba(54,78,39,0)) 50px 0,
radial-gradient(circle at 50% 41%, #364E27 3%, #D2CAAB 4%, #D2CAAB 11%, rgba(210,202,171,0) 12%, rgba(210,202,171,0)) 50px 0,
radial-gradient(circle at 50% 59%, #D2CAAB 3%, #364E27 4%, #364E27 11%, rgba(54,78,39,0) 12%, rgba(54,78,39,0)) 0 50px,
radial-gradient(circle at 50% 41%, #364E27 3%, #D2CAAB 4%, #D2CAAB 11%, rgba(210,202,171,0) 12%, rgba(210,202,171,0)) 0 50px,
radial-gradient(circle at 100% 50%, #D2CAAB 16%, rgba(210,202,171,0) 17%),
radial-gradient(circle at 0% 50%, #364E27 16%, rgba(54,78,39,0) 17%),
radial-gradient(circle at 100% 50%, #D2CAAB 16%, rgba(210,202,171,0) 17%) 50px 50px,
radial-gradient(circle at 0% 50%, #364E27 16%, rgba(54,78,39,0) 17%) 50px 50px;
background-color:#63773F;
background-size:100px 100px;

css3 漸層效果

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.