疑问框,css 矩形两边挖半圆

疑问框

css:
/圆角矩形/
.rectangle{
width: 200px;
border-radius: 15px;
position: relative;
}
/小三角/
.rectangle::before{
content: "";
width: 0;
height: 0;
border: 15px solid red;
border-color: red transparent transparent transparent;
position:absolute;
bottom: -30px;
left: 40px;
}

css 矩形两边挖半圆

css:
.bound{
background-color: #3EAAF2;
width: 300px;
height: 100px;
display: flex;
flex-direction: column;
align-items: center;
position: relative;//设置定位
}
.bound::before{
content: "";
width: 40px;
height: 40px;
border-radius: 50%;
display: block;
background: #fff;
position: absolute;
top:50%;
left: -20px;
transform:translateY(-50%);
}
.bound::after{
content: "";
width: 40px;
height: 40px;
border-radius: 50%;
display: block;
background: #fff;
position: absolute;
top:50%;
right: -20px;
transform:translateY(-50%);
}

你可能感兴趣的:(疑问框,css 矩形两边挖半圆)