css border-left 50% height

前端 未结 5 1308
心在旅途
心在旅途 2020-12-29 19:28

I want the left border of my div to show only to the half of the div. The same I would like to do to my right border but is should be set from the bottom of the div to the m

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-29 20:16

    For those trying to implement Aleksandr Belugin's answer above using border-left, here it is:

    .mybox {
      position: relative;
      padding: 10px 20px;
      background-color: #EEEEEE;
    }
    
    .mybox:after {
      content: '';
      position: absolute;
      left: 0px;
      top: 25%;
      height: 50%;
      border-left: 1px solid #0000CC;
    }
    Le content de box.

提交回复
热议问题