The most semantic way of making this container

后端 未结 9 1150
时光说笑
时光说笑 2020-12-19 09:58

I want to make the following shape using divs and border radius, with fall back to square corners for old browsers. No images please.

I am having a bit of trouble ma

9条回答
  •  鱼传尺愫
    2020-12-19 10:53

    I'm coming late to the party, but I love a challenge and here is my solution:

    demo

    http://jsfiddle.net/mtTLu/

    Features:

    1. No extra markup
    2. Falls back to straight corners
    3. No images
    4. Webkit and Firefox ready.

    However, it's terrible css code. If I ever encountered someone who made this to avoid one div of unsemantic code, I'd punch him in the face.

    But, I think it fits your constraints.

提交回复
热议问题