【发布时间】:2015-04-09 23:52:34
【问题描述】:
我想知道在PHPLucidFrame 中为特定于 IE 的样式添加 IE 条件语句的最佳模板位置。我知道我可以在每个 index.php 中添加它们,但这将是多余的。有什么建议吗?
【问题讨论】:
标签: php html css internet-explorer phplucidframe
我想知道在PHPLucidFrame 中为特定于 IE 的样式添加 IE 条件语句的最佳模板位置。我知道我可以在每个 index.php 中添加它们,但这将是多余的。有什么建议吗?
【问题讨论】:
标签: php html css internet-explorer phplucidframe
您不需要显式添加它们,因为 PHPLucidFrame 会自动将 IE 的两个 CSS 类添加到 <html> 标记,例如 ie ieX,其中 X 是您正在查看的当前 IE 版本。因此,您可以在 CSS 文件中使用这些类。
.ie { /* for all IE */
}
.ie7 { /* for IE7 */
}
.ie8 { /* for IE8 */
}
.ie9{ /* for IE9 */
}
如果您不想采用这种方式,最好使用的模板是/inc/tpl/head.php。将其复制到 /app/inc/tpl/ 并使用您的 IE 条件语句更新 /app/inc/tpl/head.php。它在所有页面中自动可用
【讨论】: