在Jade中使文本在文本之前
我正在一个导航栏上工作,我正试图在栏上按下一个button,格式为:
(图标)(文本)
以下是玉档的摘录:
a(href="/signup") h3 Sign Up span(style="font-size: 1.25em; margin-top:2%" href="/graphing").glyphicon.glyphicon-pencil
目前这产生:
(文本)(图标)
我怎么能这样跨度在h3里面,但是在玉之前呢?
你应该使用pipe道文本:
a(href="/signup") h3 span(style="font-size: 1.25em; margin-top:2%" href="/graphing").glyphicon.glyphicon-pencil | Sign Up
从文档 :
pipe道文本
向模板添加纯文本最简单的方法是在行的前面添加| 字符(发音为“pipe道”)。