我的意思是来自 fontawesome 的图标或来自 google fonts 的字体。在 HTML 中,我在头部放置了这样的内容:
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
反应怎么样?
您可以像这样将其导入样式表中
@import url('https://fonts.googleapis.com/css?family=Roboto');
你的体型将会变得
body {
font-family: 'Roboto';
}
将链接插入您的index.html
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
将外部样式表添加到 css 文件第一行。
@import url('https://fonts.googleapis.com/css?family=Roboto');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}