【问题标题】:Trying to understand some HTML5Boilerplate items试图理解一些 HTML5Boilerplate 项目
【发布时间】:2011-02-16 14:27:50
【问题描述】:

HTML5Boilerplate,在css的第72到80行,它说:

/* fonts.css from the YUI Library: developer.yahoo.com/yui/
   Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages

   There are three custom edits:
   * remove arial, helvetica from explicit font stack
   * we normalize monospace styles ourselves
   * table font-size is reset in the HTML5 reset above so there is no need
   * to repeat
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to
                                                          preserve specificity 
                                                       */ 

我想了解的是,他们为什么提到雅虎以及“保留黑客”是什么?

【问题讨论】:

    标签: css html boilerplate


    【解决方案1】:

    到 Yahoo 的链接是到 Yahoo User Interface library 的链接,他们在那里有一个东西

    ...提供跨浏览器的印刷规范化和控制,同时仍然允许用户选择和调整他们的字体大小。

    这意味着 Boilerplate 使用 YUI Fonts.css 作为其基础,但已从 YUI Css 文件中删除 Arial 和 Helvetica,本身已标准化等宽样式,并且我猜删除了 table font-size 因为它已经在他们的 HTML5 中重启。

    该 hack 是针对 IE6 的 CSS hack:*font-size:small; 只会被 IE6 及以下版本看到。

    希望对你有所帮助。

    【讨论】:

    • +1 他们所说的 fonts.css 是 this YUI css file,所以他们命名了原始来源并解释了他们更改的内容以及原因。
    • 我明白了。这真的很有帮助。谢谢! :)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-17
    • 2017-07-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多