作者:耗子很傻爱钻洞 | 来源:互联网 | 2023-05-17 23:17
ISSUE FIDDLE 1
小提琴问题1
This is the fiddle in question : Fiddle 1
这就是问题中的古提琴:古提琴1
#one {
height: 200px;
width: 200px;
border-radius: 100% 0 0 0;
background-color: plum;
box-shadow: inset 40px 40px 0 0 red, inset 80px 80px 0 0 blue, inset 120px 120px 0 0 green;
}
In this particular example, I have used 100% top-left border radius, and all other border radii are 0%, and height is equal width, producing a quadrant.
在这个特殊的例子中,我使用了100%的左上角边界半径,所有其他的边界半径都是0%,高度等于宽度,产生了一个象限。
Now I added 3 inset box-shadows to the main element with x,y offsets. I expect the box-shadows to follow the curve, and be parallel to each other, like this :
现在我在主元素中添加了3个嵌套框形阴影x,y偏移量。我希望盒子的阴影跟随曲线,并相互平行,像这样:
This is the output instead :
这是输出:
ISSUE FIDDLE 2
问题小提琴2
This is another example of box-shadow not following the curve. This one's without x-y offsets. Fiddle 2
这是盒形阴影不遵循曲线的另一个例子。这个没有x-y偏移量。小提琴2
div {
height: 200px;
width: 200px;
border-radius: 100% 0 0 0;
background-color: plum;
box-shadow: inset 0px 0px 0 70px green;
}
In this case, pink area should be a quadrant, but looks like a triangle.
在这种情况下,粉色区域应该是一个象限,但是看起来像一个三角形。
Why is inset box-shadow losing the curve as the spread radius increases? is it a bug? It seems not to be one as all major browsers give the same output.
为什么嵌套盒形阴影随着扩展半径的增加而失去曲线?这是一个错误吗?似乎不是所有主流浏览器都提供相同的输出。
1 个解决方案