作者iceleaf (我行我素 我型我塑)
看板Ajax
标题[问题] 请问如何用React.js 使用Google Fonts?
时间Thu Nov 24 12:12:07 2016
最近开始学习React.js与webpack,
想请问如果我想要使用Google Fonts网站上的字型到React.js内,
https://fonts.google.com/specimen/Roboto
我该怎麽做呢?
目前是尝试在<head>内载入,
<head>
<link href="
https://fonts.googleapis.com/css?family=Bungee+Inline|Roboto"
rel="stylesheet">
<style>
body{
font-family: 'Roboto', sans-serif;
}
</style>
但没有效果
也有尝试在webpack打包前, 在module内写CSS字体样式
但也是没效果,
想请问我该怎麽做呢?
React.js新手需要版上的援手, 感激不尽...
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 111.249.114.16
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Ajax/M.1479960730.A.C1A.html
1F:推 sullivan1982: 基本上react只会换掉<div>,你其他写在index.html 11/30 18:56
2F:→ sullivan1982: 的东西都会还在 11/30 18:56