径向渐变造型

时间:2013-06-19 17:14:52

标签: css gradient

快速提问:

如何在CSS中设置径向渐变样式以实现此效果?

谢谢!

1 个答案:

答案 0 :(得分:0)

jsfiddle链接: JsFiddle

Html代码:

<div class="gradient">
</div> 

Css代码:

.gradient{ height:79px; 
width:298px; 
background: #7ddbfb; /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover,  #7ddbfb 46%, #56bdf4 100%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(46%,#7ddbfb), color-stop(100%,#56bdf4)); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover,  #7ddbfb 46%,#56bdf4 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover,  #7ddbfb 46%,#56bdf4 100%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover,  #7ddbfb 46%,#56bdf4 100%); /* IE10+ */
background: radial-gradient(ellipse at center,  #7ddbfb 46%,#56bdf4 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7ddbfb', endColorstr='#56bdf4',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */

-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
}

您可以尝试制作渐变 Here