所以我有一个小问题。我需要一些方法来将RGB的背景颜色(151,151,151)设置为前面代码的基础。我将其复制到下面
body {
background-image: url(sd_back2.jpg);
background: -webkit-radial-gradient(circle closest-corner at 40% 70% , #ffffff 15%, rgba(151,151,151,0.5) 50% );
background: -webkit-radial-gradient (circle closest-corner at 80% 40% , #ffffff 15%, rgba(0,0,0,0) 30% );
background: -webkit-radial-gradient ( closest-side at 10% 20% , #ffffff 20%, rgba(0,0,0,0) 45% );
background: -webkit-radial-gradient (farthest-side at 90% 10% , #ffffff 15%, rgba(0,0,0,0) 40% );
background-color
如果您发现任何其他问题,请告诉我们。
答案 0 :(得分:0)
“设为基地”是什么意思?如果你想要在渐变不起作用的情况下显示你的颜色,那就完全按照你所做的那样......
body {
background-image: url(sd_back2.jpg);
background: -webkit-radial-gradient(circle closest-corner at 40% 70% , #ffffff 15%, rgba(151,151,151,0.5) 50% );
background: -webkit-radial-gradient (circle closest-corner at 80% 40% , #ffffff 15%, rgba(0,0,0,0) 30% );
background: -webkit-radial-gradient ( closest-side at 10% 20% , #ffffff 20%, rgba(0,0,0,0) 45% );
background: -webkit-radial-gradient (farthest-side at 90% 10% , #ffffff 15%, rgba(0,0,0,0) 40% );
background-color: rgb(151,151,151);
}
答案 1 :(得分:0)
为了达到将背景图像和径向渐变组合成背景所需的效果
试试这个:
body {
background: url(sd_back2.jpg),
radial-gradient(circle closest-corner at 40% 70%, white 15%, rgba(151, 151, 151, 0.5) 50%),
radial-gradient(closest-corner at 80% 40%, white 15%, rgba(0, 0, 0, 0) 30%),
radial-gradient(closest-side at 10% 20%, white 20%, rgba(0, 0, 0, 0) 45%),
radial-gradient(5% 5% at 90% 10%, white 15%, rgba(0, 0, 0, 0) 40%);
background-color: rgb(151,151,151);
}
这将结合所有效果,而不是相互覆盖。