这个梯度在标准语法中是什么?
-webkit-gradient(radial, center top, 0, center top, 1000, from(black), to(white))
如果您正在寻找跨浏览器 CSS3 径向渐变:
background: #ffffff;
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjNDA5NmVlIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-radial-gradient(center, ellipse cover, #ffffff 0%, #4096ee 100%);
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#ffffff), color-stop(100%,#4096ee));
background: -webkit-radial-gradient(center, ellipse cover, #ffffff 0%,#4096ee 100%);
background: -o-radial-gradient(center, ellipse cover, #ffffff 0%,#4096ee 100%);
background: -ms-radial-gradient(center, ellipse cover, #ffffff 0%,#4096ee 100%);
background: radial-gradient(center, ellipse cover, #ffffff 0%,#4096ee 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#4096ee',GradientType=1 );
在我看来,CSS 渐变的最佳工具是Ultimate CSS Gradient Generator。
尝试这个。
background: -webkit-radial-gradient(center top,ellipse,#color1,#color2);
注意:它可以是椭圆或圆形等。也可以为不同的浏览器添加-moz、-ms、-o等。