How can I get multiple borders with rounded corners? CSS

前端 未结 8 1051
天涯浪人
天涯浪人 2020-12-19 08:03

Any idea on how I can get round corners work with multiple borders? The box will be dynamic, depending what will be inputed into the box, so I can\'t add static width or hei

8条回答
  •  眼角桃花
    2020-12-19 08:40

    I came up with this code for a linked image using an inline block border wrapped in a box shadow with a 2nd box shadow for a 2 layer border with a shadow, 3 layers total & No css styling needed.

    inline block creates the 1st border then a box shadow creates the 2nd & icing on the cake adds the shadow followed by the rounding code that captures the inline block border as well.

    To use it for text, just change image style to span style & replace image src with text & remove the link if you don't need it.

    
    
    

提交回复
热议问题