注释

jade注释可以保留在编译后生成的html中,也可以不保留。

jade:

// 这个会保留下来
p Hello

//- 这个不会保留
p World

html:

// 这个会保留下来
<p>Hello</p>

<p>World</p>

块注释

jade支持注释一块内容

jade:

body
  //
    As much text as you want
    can go here.

html:

<body>
  <!--
  As much text as you want
  can go here.
  -->
</body>

条件注释

jade条件注释与html中的条件注释一样。

jade:

<!--[if IE 8]>
<html lang="en" class="lt-ie9">
<![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en">
<!--<![endif]-->

html:

<!--[if IE 8]>
<html lang="en" class="lt-ie9">
<![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en">
<!--<![endif]-->
posted on 2015-11-22 16:58  23333333  阅读(461)  评论(0编辑  收藏  举报