【问题标题】:How to make Drupal's Omega theme responsive for IE8 and below?如何使 Drupal 的 Omega 主题响应 IE8 及以下版本?
【发布时间】:2012-11-26 23:01:14
【问题描述】:

我使用 Omega 主题 (http://drupal.org/project/omega),它不支持 Omega 使用的 IE8 及以下的响应式设计。

【问题讨论】:

    标签: drupal drupal-7 drupal-theming


    【解决方案1】:

    想通了!我安装了 respondjs 模块 (http://drupal.org/project/respondjs) 并且不得不对 template.php 进行修改。查看http://drupal.org/node/1388898。看起来 IE 特定的 CSS 文件阻止了 respond.js 文件无法工作。我删除了 IE 特定样式表并将 ['browsers']['IE'] 从 gte IE 9 更改为 TRUE。这似乎对我有用。我将以下代码添加到我的 omega subthemes template.php 文件中。

    <?php
    function omega_subtheme_css_alter(&$css) {
        foreach ($css as $key => $value) {
            if (preg_match('/^ie::(\S*)/', $key)) {
                unset($css[$key]); 
            } else {
                $css[$key]['browsers']['IE'] = TRUE;
            }
        } 
    } 
    ?>
    

    【讨论】:

      猜你喜欢
      • 2012-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-13
      相关资源
      最近更新 更多