如何使用css创建曲线位于左上角和左下角的矩形?
我想创建这样的背景。 带曲线的矩形 我试着使用这个css如何使用css创建曲线位于左上角和左下角的矩形?,css,Css,我想创建这样的背景。 带曲线的矩形 我试着使用这个css .rect{ border-radius:50%; width:50px; height:50px; border-bottom-right-radius: -100px; border-bottom-left-radius: -100px; } .rect{ 宽度:150px; 高度:150像素; 边框左上半径:100%; 背景:#333; 颜色:#fff; 显示器:flex; 证明内容:中心;
.rect{
border-radius:50%;
width:50px;
height:50px;
border-bottom-right-radius: -100px;
border-bottom-left-radius: -100px;
}
.rect{
宽度:150px;
高度:150像素;
边框左上半径:100%;
背景:#333;
颜色:#fff;
显示器:flex;
证明内容:中心;
对齐项目:居中;
}
过滤器
请检查代码,它符合问题预期。
请将问题标记为投票,以感谢社区的共同努力。
您的问题是没有使用“边框左上半径”属性。
如有任何问题,请随时提问。
谢谢
#rcorners1{
边界半径:10px;
背景:公元7321年;
边框左上半径:100px;
填充:20px;
宽度:200px;
高度:150像素;
}
边界半径属性
具有指定背景颜色的元素的圆角:
圆角
谢谢。我被这件事弄得心烦意乱。
<!DOCTYPE html>
<html>
<head>
<style>
#rcorners1 {
border-radius: 10px;
background: #73AD21;
border-top-left-radius: 100px;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<h1>The border-radius Property</h1>
<p>Rounded corners for an element with a specified background color:</p>
<p id="rcorners1">Rounded corners!</p>
</body>
</html>