简体   繁体   中英

CSS text background-clip very different on Firefox than on Chrome

Chrome: the desired effect 在此输入图像描述

Firefox: what is happening 在此输入图像描述

Code:

  background-color: Red;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: rgba(255,255,255,0.5) 0px 3px 3px;

Thoughts??

Even though -moz-background-clip is supported in firefox. The 'text' value is not supported. You are going to have to go with another solution for non webkit browsers.

Example: http://nimbupani.com/using-background-clip-for-text-with-css-fallback.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM