• 属性font-family:Font property font-family does not have generic default


    以前定义字体都是用的常用的字体,也没注意过会有这个提示,昨天在写界面的时候重新定义了一个本地没有的字体,发现会有提示。

    W3C的文档:

    font-family:<family-name>,<generic-family>

      In the example above, the last value is a generic family name.

    Style sheet designers are encouraged to offer a generic font family as a last alternative.

    属性值需要用逗号分割每个值,并始终提供一个类族名称作为最后的选择。当指定的字体本地没有时,会依次向后匹配,如果指定的值,找不到就会提示。强烈推荐使用一个通用字体系列名作为后路。

    有两种类型的字体系列名称:

    指定的系列名称:具体字体的名称,比如:"times"、"courier"、"arial"。

    通常字体系列名称:比如:"serif"、"sans-serif"、"cursive"、"fantasy"、"monospace"

  • 相关阅读:
    书籍阴影
    Cookie工具类
    兼容性问题总结
    pc端弹框
    懒加载 js----例子------图片
    pc端样式初始化
    Sublime 插件- px 转rem
    手机端1px细线公共类
    移动端样式初始化
    SQL Server(七)——存储过程
  • 原文地址:https://www.cnblogs.com/songForU/p/10529678.html
Copyright © 2020-2023  润新知