android - 字体系列 "cursive"在 chrome mobile v47 中不起作用

标签 android css google-chrome fonts mobile-chrome

我想知道为什么它在 chrome 移动浏览器 v47(最新的 atm)中不起作用,因为它在桌面浏览器上完美运行,包括开发人员工具中的不同移动设备模式。

是否存在解决方法?至少,我可以找到下载的原始名称是什么?

检查一下:

<style>

* {
  font-family: cursive;
}

</style>

<div>
  I should be cursive even on mobile devices
</div>

JSFiddle

请注意,它可以在开发者工具中使用,但不适用于真正的移动设备。

最佳答案

永远不要依赖通用系列关键字来实际成为“特定字体”。浏览器不需要加载与关键字匹配的字体,从技术上讲它只需要加载“a”字体。 CSS specification对此非常明确:

"Generic font families are a fallback mechanism, a means of preserving some of the style sheet author's intent in the worst case when none of the specified fonts can be selected. For optimum typographic control, particular named fonts should be used in style sheets.

"All five generic font families are defined to exist in all CSS implementations (they need not necessarily map to five distinct actual fonts)."

我强调了解释您有责任加载正确字体的部分。

关于android - 字体系列 "cursive"在 chrome mobile v47 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34095998/

相关文章:

java - Android 中的万花筒效果

android - Android运行时去哪里找资源文件?

javascript - 为什么 CSS 转换不呈现?

javascript - 在不使用 javascript 的情况下,div 是否使图像高度与溢出匹配?

android - 无法解析 : com. android.support :support-compat:27. 2.0

java - 在 Android 谷歌地图中绘制 4K 多段线

CSS3 倾斜技巧

来自字符串的 Javascript 日期提供从 Chrome 到 Firefox 的不同输出

google-chrome - 在 Chrome 中使用命名空间测试 XPath 表达式

html - CSS 动画适用于 Chrome 和 Safari,但不适用于 Firefox 和 IE