0

当我在 Chrome、IE 和 Firefox 上使用此代码段时,它运行良好!但在 Safari 上它不起作用。

出现这个问题:

在此处输入图像描述

.circle-red {
	border: 2px solid;
	border-radius: 51%;
	width: 40px;
	height: 40px;
	background: radial-gradient(ellipse at 80px 40px, rgba(255, 255, 255, 0.75) 10%, rgba(255,255,255,0.5) 32%, rgba(255,255,255,0) 70% ), linear-gradient(160deg, transparent 10%, red 30%);
	background-size: 87.5% 55%, 100% 100%;
	background-repeat: no-repeat;
}
<div class="circle-red"></div>

4

1 回答 1

1

试试这个在你的 background-size 属性和你的背景渐变值上添加一个 webkit 前缀。这是一个例子:

.circle-red {
    border: 2px solid;
    border-radius: 51%;
    width: 40px;
    height: 40px;
    background: radial-gradient(ellipse at 80px 40px, rgba(255, 255, 255, 0.75) 10%, rgba(255,255,255,0.5) 32%, rgba(255,255,255,0) 70% ), linear-gradient(160deg, transparent 10%, red 30%);
   background: -webkit-radial-gradient(ellipse at 80px 40px, rgba(255, 255, 255, 0.75) 10%, rgba(255,255,255,0.5) 32%, rgba(255,255,255,0) 70% ), linear-gradient(160deg, transparent 10%, red 30%);
    background-size: 87.5% 55%, 100% 100%;
-webkit-background-size: 87.5% 55%, 100% 100%;
    background-repeat: no-repeat;
}
于 2016-02-02T17:34:58.983 回答