这就是我想出的。还没有在一个大块上尝试过,但是在这个块上,我看不到可见的径向线:
HTML:
<div id="gradient_div"></div>
CSS:
#gradient_div {
margin: 0 auto;
border-radius: 20px;
width: 500px;
height: 500px;
background-color:rgba(171, 171, 171, 0.1);
background-image: -moz-radial-gradient(50% 0%, circle cover, rgba(171, 171, 171, 0.3), #242bff 50%);
background-image: -webkit-radial-gradient(50% 0%, circle cover, rgba(171, 171, 171, 0.3), #242bff 50%);
background-image: -o-radial-gradient(50% 0%, circle cover, rgba(171, 171, 171, 0.3), #242bff 50%);
background-image: -ms-radial-gradient(50% 0%, circle cover, rgba(171, 171, 171, 0.3), #242bff 50%);
background-image: radial-gradient(50% 0%, circle cover, rgba(171, 171, 171, 0.3), #242bff 50%);
}
这是一个 JSFiddle 版本,您可以随意使用:http: //jsfiddle.net/Hz8ME/