; Add a style sheet for all media stylesheets[all][] = theStyle.css ; Add a style sheet for screen and projection media stylesheets[screen, projection][] = theScreenProjectionStyle.css ; Add a style sheet for print media stylesheets[print][] = thePrintStyle.css ; Add a style sheet with media query stylesheets[screen and (max-width: 600px)][] = theStyle600.css
注意:更新了 theme.info以后,需要更新缓存。
通常在使用的过程中,还需要增加一些额外的 css 样式文件,如CDN上的文件,这时,theme.info 已经不能满足当前的需求,则需要通过 template.php 进行添加,同样,仍然假定当前主题为 mytheme
在Drupal 7 中,可以通过以下办法实现
'external')); } ?>但在 Drupal 6 中,就需要通过以下办法实现
'stylesheet', 'type' => 'text/css', 'href' => 'http://fonts.googleapis.com/css?family=News+Cycle') ) ." />\n"; } ?>原文链接: https://drupal.org/node/171209