/[if lt IE 8]
/[if IE 8]
/[if IE 9]
的last one is a bit different。打破它,你想要的是围绕html开始标签的两条评论,所以第二条评论是html元素的第一个内容。你也不能使用Haml语法来进行条件注释,你必须使用文字注释。在Haml的,这将是这样的:
%html{:class => 'no-js', :lang => 'en'}
这将产生HTML这样的:
如果你想你可以使用whitespace removal syntax使生成的HTML更像是你的榜样:
%html{:class => 'no-js', :lang => 'en'}<>
把它放在一起:
!!!
/[if lt IE 8]
/[if IE 8]
/[if IE 9]
%html{:class => 'no-js', :lang => 'en'}<>
content here
主要生产:
content here
= surround "", "" do
content here