虽然不是真正的字体,但它将只加载一次小型图像,该图像可用于生成类似文本的任意数量。
* {
box-sizing: border-box;
}
h1 {
position: relative;
display: inline-block;
color: red;
padding: 15px;
background-color: white;
box-shadow:inset 0px 0px 0px 10px red;
}
h1:after {
content: '';
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-image: url("http://i.imgur.com/5O74VI6.jpg");
mix-blend-mode: lighten;
}
<h1>
CANCELLED
</h1>