Margin for bottom border

后端 未结 4 1209
忘了有多久
忘了有多久 2021-02-13 12:30

Is there any way I can only add margin to the border ?

Only border should have margin not the text. I am trying to move border not the text field. Border need to be shri

4条回答
  •  名媛妹妹
    2021-02-13 12:56

    You can use pseudo-element and then you can change size of border

    .margin-check {
      display: inline-block;
      position: relative;
    }
    
    .margin-check:after {
      position: absolute;
      content: '';
      border-bottom: 1px solid #d2d7da;
      width: 70%;
      transform: translateX(-50%);
      bottom: -15px;
      left: 50%;
    }
    Something I am typing for checking the border margin

提交回复
热议问题