CSS3 Text Gradients not working?

后端 未结 4 927
天命终不由人
天命终不由人 2021-01-29 09:15

I am trying to apply pure CSS3 Gradients (no images, etc.) on some text but the text remains un-changed.

My current code is:





        
4条回答
  •  误落风尘
    2021-01-29 09:43

    I would recommend this site, this will work for all modern browsers

    background-image: linear-gradient(bottom, rgb(93,245,172) 22%, rgb(121,255,207) 61%, rgb(158,255,249) 81%);
    background-image: -o-linear-gradient(bottom, rgb(93,245,172) 22%, rgb(121,255,207) 61%, rgb(158,255,249) 81%);
    background-image: -moz-linear-gradient(bottom, rgb(93,245,172) 22%, rgb(121,255,207) 61%, rgb(158,255,249) 81%);
    background-image: -webkit-linear-gradient(bottom, rgb(93,245,172) 22%, rgb(121,255,207) 61%, rgb(158,255,249) 81%);
    background-image: -ms-linear-gradient(bottom, rgb(93,245,172) 22%, rgb(121,255,207) 61%, rgb(158,255,249) 81%);
    
    background-image: -webkit-gradient(
        linear,
        left bottom,
        left top,
        color-stop(0.22, rgb(93,245,172)),
        color-stop(0.61, rgb(121,255,207)),
        color-stop(0.81, rgb(158,255,249))
    );
    

    Also try using css3pie, it allows you to add some code that makes it work in IE browsers.

提交回复
热议问题