I'm trying to incorporate some UI components to a BoilerplateJS project that I'm currently working on, to be specific I want to implement this [http://wijmo.com/wiki/index.php/Getting_Started_with_Wijmo] sample inside a BoilerplateJs component. How can I add the external css files to my BoilerplateJs project.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There are several ways to import style-sheets.
- Directly in the index file. (Best suited for style-sheets of libraries such as jQueryUI and Wijmo in your case)
- As a theme, in themes module
- As a part of the module, in modules folder (Best suited for module specific styles such as position within the module, and module images).
For module specific styling, you can include files by file path (example):
Boiler.ViewTemplate.setStyleLink(cssPath);
or by CSS text itself:
Boiler.ViewTemplate.setStyleText(cssText);