我正在尝试将一些 UI 组件合并到我当前正在开发的 BoilerplateJS 项目中,具体来说,我想在 BoilerplateJs 中实现这个 [http://wijmo.com/wiki/index.php/Getting_Started_with_Wijmo] 示例成分。
如何将外部 css 文件添加到我的 BoilerplateJs 项目中。
有多种方法可以导入样式表。
- 直接在索引文件中。 (最适合您的情况下的库样式表,例如 jQueryUI 和 Wijmo)
- 作为一个主题,在主题模块 https://github.com/ectechno/boilerplatejs/tree/master/src/modules/baseModule/theme
- 作为模块的一部分,在模块文件夹 https://github.com/ectechno/boilerplatejs/tree/master/src/modules/sampleModule1/departments(最适合模块特定样式,例如模块内的位置和模块图像)。
对于特定于模块的样式,您可以按文件路径包含文件(例子) https://github.com/ectechno/boilerplatejs/blob/master/src/modules/sampleModule1/departments/component.js:
Boiler.ViewTemplate.setStyleLink(cssPath);
或者通过 CSS 文本本身:
Boiler.ViewTemplate.setStyleText(cssText);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)