切换到 gatsby-plugin-image 后,CSS 边框半径在 Safari 中不起作用

Ask*_*ion 0 css gatsby

切换到 gatsby-plugin-image 后,CSS 边框半径在 Safari 中不起作用

在我的笔记本电脑上,我可以看到图像的边框半径,但它似乎不适用于 iPhone 或 iPad。(即图像仅在 iPhone / iPad 上是方形的,我没有看到 border-radius:25px 应用于图像)

编辑11-24:抱歉,这是我正在使用样式组件的代码片段

export const MyImageContainer = styled(GatsbyImage)`
  cursor: pointer;
  border-radius: 25px;
`

Run Code Online (Sandbox Code Playgroud)

小智 5

是的,这是一个古老的“错误”。这个 css hack 应该可以修复它。

-webkit-mask-image: -webkit-radial-gradient(white, black);
Run Code Online (Sandbox Code Playgroud)