gpt4 book ai didi

css - Drupal 7 - Internet Explorer 7&8 忽略样式表

转载 作者:行者123 更新时间:2023-12-02 05:18:45 25 4
gpt4 key购买 nike

我即将完成 Drupal 7 网站构建并正在浏览器中进行测试。除了 IE 7 和 8 之外,所有浏览器都很好 - 这似乎是一个常见问题。

我读过很多关于 IE 7 和 8 如何忽略超过 31 个样式表请求的内容。

我已经采取了很多我在 Stackoverflow 和互联网上找到的建议。

  • Performance -> Aggregate and compress CSS files 中压缩 CSS 文件 - 我现在可以在源代码中看到加载了 5 个样式表,但是,IE 仍然没有加载我的样式表!
  • 我在 html.tpl.php 文件中的所有其他样式表之前添加了对 IE7 样式表的直接调用(硬编码)
  • 我还使用了一个名为条件样式表的模块来允许调用 .info 文件中的特定样式表

这些都不起作用。

我还在我的 template.php 文件中添加了以下内容,以按照 James Hopkins 的建议删除某些 Drupal CSS 文件(我知道它说的是 IE6,但是嘿,值得一试。

# get array of stylesheets
$css = drupal_add_css();
unset($css['all']['module']['modules/system/system.css']);
unset($css['all']['module']['modules/system/defaults.css']);
unset($css['print']['theme']['themes/mytheme/print.css']);

网站链接 88.208.247.36它仍然是 ip 格式,因为域尚未传递到网络服务器。

最佳答案

你试过吗?

将此添加到您的 clinigen.info 文件中:

stylesheets-conditional[lte IE 7][all][] = _css/ie7.css

并从 main.css 中删除它:

@import url("ie7.css");

关于css - Drupal 7 - Internet Explorer 7&8 忽略样式表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12424174/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com