A
A
Alexey Vinogradov2021-04-07 14:08:52
css
Alexey Vinogradov, 2021-04-07 14:08:52

How to make a soft square radius?

Hello everyone, can you please tell me how to achieve such a shape for an icon using rounding or mathematics?
606d92ea8150a363973753.jpeg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
deppa1118, 2021-04-09
@deppa1118

If suddenly it’s still relevant, then the figure is called squircle, on the droider show channel there is a full description about it and a mat function how to display it https://youtu.be/GuFJTPf13RU

P
Pavel Ataykin, 2021-04-07
@pavel_ataykin

Hey! the border-radius property is sufficient for this. Here https://developer.mozilla.org/ru/docs/Web/CSS/bord... documentation with examples of how to do something similar. You just have to choose the right numbers for your case.
-----
I've been corrected below. I agree with this that through the border-radius 1 to 1 can not be done. A simple option would be the dock's mask-image property: https://developer.mozilla.org/en-US/docs/Web/CSS/m...
PS Browser support is good, interactive allows you to take into account even without strange polygons :)

H
Helcurt, 2021-04-08
@Radia

It's an ellipse! There is an ellipse plot function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question