how to give input border left and right small length

前端 未结 5 1940
感动是毒
感动是毒 2021-01-20 14:28

I need to display the input field and i need give border bottom , left and right. But here i want only small portion border left side and right side.

5条回答
  •  無奈伤痛
    2021-01-20 14:42

    li{
    list-style: none;
    width: 200px;
    border-bottom: 2px solid #000;
    position: relative;
    padding: 2px 5px;
    margin: 0 0 10px;
    }
    li:before, li:after{
      background: #000;
      content: '';
      position: absolute;
      bottom: 0;
      width: 2px;
      height: 5px;
    }
    li:before{
      left: 0;
    }
    li:after{
      right: 0;
    }
    input{
      border:0;
    outline: none;
    }

提交回复
热议问题