我一直在阅读有关此问题的一些信息,但我不是 CSS 专家,所以我想问一下。我在带有噪音的深色背景图像上使用此代码,它在 Firefox 中看起来很棒,但在 Safari 中它有环:
#welcome {
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
background-image: -webkit-radial-gradient(circle, rgba(100,100,100,0.2), rgba(0,0,0,0.9));
background-image: -moz-radial-gradient(circle, rgba(100,100,100,0.2), rgba(0,0,0,0.9));
background-image: -linear-radial-gradient(circle, rgba(100,100,100,0.2), rgba(0,0,0,0.9));
background-image: -ms-radial-gradient(circle, rgba(100,100,100,0.2), rgba(0,0,0,0.9));
background-image: -o-radial-gradient(circle, rgba(100,100,100,0.2), rgba(0,0,0,0.9));
}
#welcome::after {
content: '';
width: 100%;
height: 100%;
position: absolute;
top: 0px;
left: 0px;
z-index: -1;
background-image: -webkit-radial-gradient(circle, rgba(255,255,255,0.1), rgba(255,255,255,0));
background-image: -moz-radial-gradient(circle, rgba(255,255,255,0.1), rgba(255,255,255,0));
background-image: -linear-radial-gradient(circle, rgba(255,255,255,0.1), rgba(255,255,255,0));
background-image: -o-radial-gradient(circle, rgba(255,255,255,0.1), rgba(255,255,255,0));
background-image: -ms-radial-gradient(circle, rgba(255,255,255,0.1), rgba(255,255,255,0));
}
在这里你可以看到结果首先是好的,其次是坏的:
有人可以向我建议对此可以做些什么吗?或者是否有另一种方法可以在没有戒指的情况下重现这种效果?非常感谢,
rc