CSS3 Text Gradients not working?

后端 未结 4 923
天命终不由人
天命终不由人 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:41

    That will only work for webkit users. To support all browsers you'll need at least:

    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#000000'); /* for IE */
    background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000)); /* for webkit browsers */
    background: -moz-linear-gradient(top,  #ccc,  #000); /* for firefox 3.6+ */ 
    

    Change the color values to the values of your need.

    Edit: As @Lokase said: you can also use the generator which he linked in his/her comment.

提交回复
热议问题