在CSS中,我们可以使用@font-face声明自定义字体,或者使用Google Fonts等在线字体资源来制作艺术字。1. 使用@font-face声明自定义字体首先,我们需要找到一款想要使用的字体
@font-face{ font-family: '艺术字'; /*自定义字体名*/ src: url('path/to/font.ttf'); /*字体文件路径*/ }
p{ font-family: '艺术字', sans-serif; /*使用自定义字体*/ }
<link href="https://fonts.googleapis.com/css2?family=Indie+Flower&display=swap" rel="stylesheet">
p{ font-family: 'Indie Flower', cursive; /*使用在线字体*/ }
粉丝
0
关注
0
收藏
0