首页 > 解决方案 > 如何填充轮廓字体

问题描述

我正在尝试将字体 CC Biff Bam Boom Outline Regular 用于 Web 项目。(https://fonts.adobe.com/fonts/cc-biff-bam-boom

有没有办法改变字符(轮廓)和字符内部的颜色?

标签: fontswebfonts

解决方案


试试这个代码:

h1 { font-size: 4em;
    -webkit-text-stroke: 3px darkgrey;
    -webkit-text-fill-color: white;
   -webkit-animation: fill 0.5s infinite alternate;}

@-webkit-keyframes fill {
  from { -webkit-text-fill-color: steelblue; }
  to { -webkit-text-fill-color: slategrey; }
 }

推荐阅读