问题
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);
来源:https://stackoverflow.com/questions/12455785/adding-external-css-file-to-a-boilerplatejs-project