How can I show only corner borders?

后端 未结 16 1863
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 10:06

I\'m wondering if it\'s possible in CSS or jQuery to make a border but only for corner. Something like this:

****                         ****
*                     


        
16条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 10:29

    SVG

    This is another great alternative if you now want to start using vectors to allow for great responsiveness.

    
      
      
      
      
    

    SVG is a great tool to use. Some of the advantages of using SVG in this case are:

    • Curve control
    • Fill control (opacity, color)
    • Stroke control (width, opacity, color)
    • Amount of code
    • Time to build and maintain the shape
    • Scalable
    • No HTTP request (if used inline like in the example)

    Browser support for inline SVG goes back to Internet Explorer 9. See canIuse for more information.

提交回复
热议问题