<fieldset>
<legend>这里显示文字</legend>
这里显示内容
</fieldset>
fieldset{
width: 500px;
min-height: 200px;
border-radius: 10px;
border: 2px solid #4fbaba;
}
legend{
position: relative;
text-align: center;
padding: 0 50px;
}
legend:before, legend:after{
content: '';
display: table;
position: absolute;
top: 0;
width: 20px;
height: 20px;
border-radius: 10px;
background: #4fbaba;
}
legend:before{
left: 0;
}
legend:after{
right: 0;
}
<div class="container">
<div class="blueBorder">
<div class="blueRadius">
</div>
<div class="blueRadius">
</div>
<div class="text">
这里显示文字
</div>
</div>
</div>
.container{
width: 100%;
height: 100%;
display: flex;
justify-content:center;
background-color: #ffffff;
}
.blueBorder{
width: 400px;
height: 150px;
border:2px solid rgba(63,174,174,1);
border-radius: 20px;
position: relative;
}
.blueBorder div{
position: absolute;
}
.blueRadius{
width: 12px;
height: 12px;
border-radius: 6px;
background-color: rgba(63,174,174,1);
}
.blueRadius:first-child{
top: -6px;
left: 50px;
}
.blueRadius:nth-child(2){
top: -6px;
right: 50px;
}
.text{
width: 272px;
top: -10px;
left: 62px;
height: auto;
text-align: center;
background-color: #ffffff
}
2 回答1.5k 阅读✓ 已解决
2 回答871 阅读✓ 已解决
1 回答1.1k 阅读✓ 已解决
1 回答885 阅读✓ 已解决
2 回答779 阅读
1 回答764 阅读✓ 已解决
2 回答1.1k 阅读
html
css