我在我正在构建的新网站上使用径向渐变,但颜色在桌面上的 Safari 中呈现不同(更暗)。有没有更好的跨浏览器语法可供使用?
我尝试了不同的前缀,但这并没有解决问题。我正在使用的代码如下。
.item1 {
background: -webkit-radial-gradient( bottom left, farthest-side, rgba(218, 218, 216, 0.5), transparent), -webkit-radial-gradient( bottom right, farthest-corner, rgba(253, 253, 253, 0.5), transparent 300px);
background: -o-radial-gradient( bottom left, farthest-side, rgba(218, 218, 216, 0.5), transparent), -o-radial-gradient( bottom right, farthest-corner, rgba(253, 253, 253, 0.5), transparent 300px);
background: radial-gradient( farthest-side at bottom left, rgba(218, 218, 216, 0.5), transparent), radial-gradient( farthest-corner at bottom right, rgba(253, 253, 253, 0.5), transparent 300px);
background-size: 100% 100%;
background-repeat: no-repeat;
}
Run Code Online (Sandbox Code Playgroud)
当前在 Chrome 和 Firefox 中看到的正确输出: https: …