Inner text shadow with CSS

后端 未结 22 1358
情深已故
情深已故 2020-11-28 18:07

I am currently playing around with CSS3 and trying to achieve a text effect like this (the black blurry inner shadow):

22条回答
  •  爱一瞬间的悲伤
    2020-11-28 18:51

    Seems everyone's got an answer to this one. I like the solution from @Web_Designer. But it doesn't need to be as complex as that and you can still get the blurry inner shadow you're looking for.

    http://dabblet.com/gist/3877605

    .depth {
        display: block;
        padding: 50px;
        color: black;
        font: bold 7em Arial, sans-serif;
        position: relative;
     }
    
    .depth:before {
        content: attr(title);
        color: transparent;
        position: absolute;
        text-shadow: 2px 2px 4px rgba(255,255,255,0.3);
    }
    

提交回复
热议问题