fonts - 如何填充轮廓字体
问题描述
我正在尝试将字体 CC Biff Bam Boom Outline Regular 用于 Web 项目。(https://fonts.adobe.com/fonts/cc-biff-bam-boom)
有没有办法改变字符(轮廓)和字符内部的颜色?
解决方案
试试这个代码:
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; }
}
推荐阅读
- azure - Azure 流分析输出到 azure 函数应用
- spring-boot - @RolesAllowed vs request.isUserInRole() 在 Spring Boot 休息控制器上
- bash - 如何为每个快捷方式运行脚本
- mysql - 如何更新在其父级中实际上是重复的具有唯一 ID 的外键字段?
- ios - Urban Airship 显示错误的 JSON 有效负载
- docker - 在根级存储库中添加 jcenter() 会破坏我的构建
- html - 时事通讯的 html 表
- matlab - 在 Matlab 中查找由数据点表示的区域的边界
- javascript - Firefox alt 键 preventDefault 不起作用
- java - Prometheus 计数 API 调用