Transparent text with text-shadow in IE

后端 未结 4 1574
不思量自难忘°
不思量自难忘° 2021-01-18 20:56

When using color: rgba(255,255,255,0.0); in conjunction with text-shadow: 0px 0px 2px rgba(255,255,255,1);, Internet Explorer seems to inherit the

4条回答
  •  失恋的感觉
    2021-01-18 21:10

    You could just hide the text off the edge of the window/screen, consider adding a fallback for older versions of IE as well.

    Working Example

    .black-box {
        background: url(http://i44.tinypic.com/2rzwis3.jpg) no-repeat;
        padding: 20px;
    }
    span.shadow {
        font: 20px Arial;
        position: absolute;
        left:-100px;
        top:-100px;
        color: rgba(0, 0, 0, 1);
        text-shadow: 120px 120px 2px rgba(255, 255, 255, 1);
    }
    
    
    
    
    This is some text.

提交回复
热议问题