【问题标题】:How to properly integrate HTML5 Boilerplate with JQuery UI?如何将 HTML5 Boilerplate 与 JQuery UI 正确集成?
【发布时间】:2012-02-16 14:59:12
【问题描述】:

我正在使用 HTML5 Boilerplate,并希望合并 JQuery UI。添加 JS 似乎没什么大不了的:

<script src="//code.jquery.com/ui/1.8.17/jquery-ui.min.js"></script>
<script>window.jQuery.ui || document.write('<script src="js/libs/jquery-ui.min.js"><\/script>')</script>

但是我将如何合并 CSS 文件?我会在调用 HTML5BP style.css 之后才调用它吗?

<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/redmond/jquery-ui-1.8.17.custom.css">

【问题讨论】:

  • 我不认为这会有所作为,因为这两个不会以某种方式交互,但我会将 jquery css 放在其他 css 之后

标签: jquery html jquery-ui html5boilerplate


【解决方案1】:

简单的答案是肯定的。只需将 jquery 链接放在 H5BP 链接之后即可:

<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/redmond/jquery-ui-1.8.17.custom.css">

【讨论】:

    【解决方案2】:

    在 style.css 中,您有一个“作者部分”,位于规范化部分和关于媒体查询、非语义辅助类等的最后部分之间。

    要么复制粘贴整个 jquery-ui-1.8.17.custom.css 到作者部分,就好像它是你自己代码的一部分,或者如果你想分开一些东西,在那里添加一个 @import 规则.阅读文档http://html5boilerplate.com/docs/:css 页面和构建脚本页面。

    【讨论】:

      猜你喜欢
      • 2012-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多