翡翠模板引擎中的IE条件语句 [英] IE conditional statements in Jade template engine
问题描述
如何转换JADE语言中的以下IE条件语句:
<! - [if IE 8]> ; < html lang =enclass =ie8>百分比抑制率ENDIF] - GT!;
<! - [if IE 9]> < html lang =enclass =ie9>百分比抑制率ENDIF] - GT!;
<! - [if!IE]><! - > < html lang =en> <! - <![ENDIF] - GT;
我尝试过以下操作,但不起作用:
//如果IE 8
/ pre>
html lang =enclass =ie8
//如果IE 9
html lang = enclass =ie9
// if!IE
html lang =en
//<![endif]
它显示以下输出:
<! --if IE 8html lang =enclass =ie8
- >
<! - 如果IE 9html lang =enclass =ie9
- >
<! - if!IEhtml lang =en
- >
<! - <![endif] - >
有人可以指导我如何纠正。
解决方案支持
//如果IE 8
条件注释语法在几个月前被删除: Git提交
版本0.35是支持他们的最后一个版本; v1.0是删除后的第一个版本。
我一直在使用文字风格@Jayram使用;只有差异才是 h5bp 和关闭html标签的条件逻辑:
| <! - [if IE 8]> < html lang =enclass =lt-ie9>百分比抑制率ENDIF] - GT!;
| <! - [if IE IE 8]><! - > < html lang =en> <! - <![ENDIF] - GT;
注意请记住用
| < / html>
由于初始html标签不是Jade的自动关闭语法。How can I convert following IE conditional statements in JADE language :
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9"> <![endif]--> <!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
I have tried following but it is not working:
//if IE 8 html lang="en" class="ie8" //if IE 9 html lang="en" class="ie9" //if !IE html lang="en" // <![endif]
It is showing following output :
<!--if IE 8html lang="en" class="ie8" --> <!--if IE 9html lang="en" class="ie9" --> <!--if !IEhtml lang="en" --> <!-- <![endif]-->
Can some one guide me how it can be rectified.
解决方案Support for the
//if IE 8
conditional comment syntax was removed few months ago: Git Commit
Version 0.35 was the last version to support them; v1.0 is the first release after the removal.
I've been using the literal style @Jayram uses; only differences being conditional logic à la h5bp and the closing html tag:
| <!--[if IE 8]> <html lang="en" class="lt-ie9"> <![endif]--> | <!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]-->
Note: Remember to close the document with
| </html>
since the initial html tag is not Jade's self-closing syntax.这篇关于翡翠模板引擎中的IE条件语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!