Triangle shadow on CSS ribbon

后端 未结 2 1032
無奈伤痛
無奈伤痛 2021-02-15 05:02

I am trying to replicate \"http://imgur.com/EutshK1\" as pixel perfect as I can get and im having trouble trying to do the

2条回答
  •  自闭症患者
    2021-02-15 05:43

    What if you add a new element to create missing shadow?

    #abc {
        display:inline-block;       
        border: .9em solid #ebeced;
        border-right-color:transparent;
        position:absolute;
        right:-73px;
        z-index:-3;
        bottom:-12px;
    }
    

    http://jsfiddle.net/k0a6jhv6/9/

    another solution, use span:after inside #content

    #content span:after {
        content:'';
        display:block;      
        border: .9em solid #ebeced;
        border-right-color:transparent;
        position:absolute;
        right:-73px;
        z-index:-3;
        bottom:-12px;
    }
    

    http://jsfiddle.net/k0a6jhv6/11/

提交回复
热议问题