PHPLucidFrame 中添加 IE 条件语句的最佳模板位置是什么?
What is the best template place in PHPLucidFrame to add IE conditional statements?
我想知道 PHPLucidFrame 中用于为 IE 特定样式添加 IE 条件语句的最佳模板位置。我知道我可以在每个 index.php 中添加它们,但这将是多余的。有什么建议吗?
您不需要显式添加它们,因为 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
。它在所有页面中自动可用
我想知道 PHPLucidFrame 中用于为 IE 特定样式添加 IE 条件语句的最佳模板位置。我知道我可以在每个 index.php 中添加它们,但这将是多余的。有什么建议吗?
您不需要显式添加它们,因为 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
。它在所有页面中自动可用