html - 如何在内容脚本中的 Chrome 扩展中使用@font-face

标签 html google-chrome css google-chrome-extension font-face

既然我不能在 CSS 文件上使用 chrome.extension.getURL(),我该如何在本地字体文件上使用 @font-face?

最佳答案

这里是如何在css中获取本地路径:

body {
  background-image:url('chrome-extension://__MSG_@@extension_id__/background.png');
}

更多信息 here .

关于html - 如何在内容脚本中的 Chrome 扩展中使用@font-face,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4535816/

相关文章:

javascript - 在后台上传 Tornado 的html文件中,如何获取成功消息?

html - Bootstrap : Equal height of nested col-md-* elements

google-chrome - 应用程序缓存: why Chrome show some files underlined in the console log?

html - 防止类中的某些元素从其父类继承样式

html - css关键帧位置问题

html - 鼠标悬停时出现带箭头的面包屑

android - 有没有办法覆盖 Chrome 的 “Request Desktop Site” 选项?

html - 嵌入式 Flash 在 Google Chrome 中不起作用?

html - 怎么把视频放在一行

CSS 元素 "Background"给 div 标签图片源