Pure CSS3 text color gradient - Is it possible?

前端 未结 4 991
予麋鹿
予麋鹿 2020-12-15 17:16

Is there a way to create a cross-browser, pure CSS3 text color gradient?

So, no png\'s. No \'webkit\' only.

EDIT: To be mo

4条回答
  •  粉色の甜心
    2020-12-15 17:35

    Best solution at the moment is to use a solid color as non-webkit fallback and then use the following technique ( requires webkit ):

    h1 {
      color: $333;
      font-size: 72px;
      background: -webkit-linear-gradient(#eee, #333);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    Example

提交回复
热议问题