最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

css - Trying to make an image a circle in Gutenberg

programmeradmin1浏览0评论

Gutenberg allows extra CSS styles for an image.

I want to make the image a circle and I thought this CSS would work:

img.imgcircular {
-webkit-clip-path: circle(15.7% at 50% 50%);
clip-path: circle(15.7% at 50% 50%);
}

And the class on the image is "imgcircular"

Any ideas why it doesn't work?

Thanks

Gutenberg allows extra CSS styles for an image.

I want to make the image a circle and I thought this CSS would work:

img.imgcircular {
-webkit-clip-path: circle(15.7% at 50% 50%);
clip-path: circle(15.7% at 50% 50%);
}

And the class on the image is "imgcircular"

Any ideas why it doesn't work?

Thanks

Share Improve this question asked Mar 17, 2020 at 8:26 HenryHenry 9831 gold badge8 silver badges31 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

In your .css try to add the following :

.is-style-circle-mask img,
.is-style-rounded img {
-webkit-clip-path: circle(15.7% at 50% 50%);
 clip-path: circle(15.7% at 50% 50%);
}
发布评论

评论列表(0)

  1. 暂无评论