我正在尝试更新我们的一个老的基于ZPT的应用程序,我想实现以下HTML5样板最佳实践,用于向<html>中添加条件IE类。
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->由于我已经在许多非ZPT站点上使用了这种技术,所以我没有过多地考虑它,但是当我去实现它时,我遇到了一些问题。
<html>元素中,比如<html metal:define-macro="page">。即使我得到了要显示的条件注释,我的下一个障碍似乎是正确定义页面宏。有人能解释一下这两个问题吗?
发布于 2013-09-05 20:33:43
奇怪的是,zpt不删除评论。也许这是zpt的一个特殊实现,是谁做的呢?无论如何,您试过使用tal:replace="strucutre:.“吗?
<metal:macro metal:define-macro="page">
<tal:doctype tal:replace="structure string:<!DOCTYPE html">" />
<!-- If the comments are eaten, you can generate them using the same trick that
tal:doctype above -->
</metal:macro>https://stackoverflow.com/questions/17094451
复制相似问题