How does html implement this border style, with text displayed in the middle of the border?

Apr.29,2022

html

<div class="item">
  <h3> </h3>
</div>

css

 *{box-sizing: border-box; padding: 0;margin: 0;}
body{
  padding: 50px
}
.item{
  width: 500px;
  height: 200px;
  margin: 0 auto;
  padding: 15px;
  border:2px solid rgba(63,174,174,1);
  border-radius: 20px;
  position: relative;
  h3{
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: -sharpfff;
    padding: 0 50px;
    z-index: 2;;
  }
  &:before,&:after{
    content: '';
    position: absolute;
    top: -7px;
    width: 12px;
    height: 12px;
    border-radius: 6px;
    background-color: rgba(63,174,174,1);
    z-index: 3;
  }
  &:before{
    left: 135px;
  }
  &:after{
    right: 135px
  }
}

  Link description  

Menu