API:http://api.drupal.org/api/function/drupal_add_css
drupal_add_css($path = NULL, $type = 'module', $media = 'all', $preprocess = TRUE)
增加CSS文件到风格队列
- 参数:
- $path (可选的),CSS文件路径是相对base_path(),例如:/modules/devel/devel.css
- $type (可选的),module 或 theme
- $media (可选的) ,例如:all, print, screen.
- $preprocess (可选的) Should this CSS file be aggregated and compressed if this feature has been turned on under the performance section?(看不懂)
例子:
function tagadelic_init() {
drupal_add_css(drupal_get_path('module', 'tagadelic') .'/tagadelic.css');
}
没有评论:
发表评论