css 实现半圆与四分之一圆

tech2022-07-11  166

半圆的css

控制  border-radius 与宽 高,来设置圆的方向。

div { width:10px; height: 20px; background-color: pink; border-radius: 0 10px 10px 0; /*四个值分别为 左上、右上、右下、左下 */ }

1/4圆

这里是左上的四分之一圆。根据需要变化 border-radius 的值。

div { width: 10px; height: 10px; background-color: pink; border-radius: 10px 0 0 0; /*四个值分别对应 左上、右上、右下、左下 */ }

希望有帮到你。

最新回复(0)