2

我正在使用 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">
4

2 回答 2

1

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

<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/redmond/jquery-ui-1.8.17.custom.css">
于 2012-02-21T23:09:26.227 回答
0

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

将整个 jquery-ui-1.8.17.custom.css 复制粘贴到作者部分,就好像它是您自己代码的一部分一样,或者如果您想分离内容,请在此处添加 @import 规则。阅读文档http://html5boilerplate.com/docs/:css 页面和构建脚本页面。

于 2012-02-17T00:42:38.970 回答