css文字颜色渐变及阴影效果

参考文档

  .desc {
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0px 3px 6px #e35f0b;
    color: #fff;
    display: inline-block;
    position: relative;
  }

  .desc::after {
    position: absolute;
    left: 0;
    top: 0;
    content: attr(data-text);
    color: #fcf4ae;
    -webkit-mask-image: -webkit-gradient(
      linear,
      0 0,
      0 bottom,
      from(rgba(0, 0, 0, 0)),
      to(#fcf4ae)
    );
  }
posted @ 2018-09-28 19:20  jaggerd  阅读(503)  评论(0)    收藏  举报