css伪类实现矩形缺半圆
作者:
一包 | 来源:发表于
2019-03-05 17:11 被阅读0次

image.png
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>margin</title>
<style>
#btn{
display: block;
width: 100px;
height: 40px;
background-color: lightcoral;
text-align: center;
line-height:40px;
position: relative;
color: #FFF;
font-size: 2em;
margin: 0 auto;
}
#btn::after{
content: "";
width: 30px;
height: 30px;
border-radius: 50%;
display: block;
background: white;
position: absolute;
top:50%;
right: -15px;
transform:translateY(-50%);
}
</style>
</head>
<body>
<div id="btn"></div>
</body>
</html>
本文标题:css伪类实现矩形缺半圆
本文链接:https://www.haomeiwen.com/subject/vdpouqtx.html
网友评论