css border-left 50% height

前端 未结 5 1310
心在旅途
心在旅途 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条回答
  •  独厮守ぢ
    2020-12-29 20:12

    2018: For modern browsers:

    You can use border-image with gradients something like...

    border-image: linear-gradient(to bottom, rgba(0,0,0,0) 25%,rgba(0,0,0,1) 25%,rgba(0,0,0,1) 75%,rgba(0,0,0,0) 75%);
    border-image-slice: 1;
    

    Demo: https://jsfiddle.net/hz8wp0L0/

    Tool: Gradient Editor

    Can I Use : border-image (IE11)

提交回复
热议问题