2014-09-22 153 views
4

我試圖創建一個帶有超鏈接的列表。每個列表項目都包含一個主題,並在一行中對該主題進行簡單描述。我想爲主題包含超鏈接,但不包含描述。我所做的是如下。Jade模板:如何在UL中創建超鏈接並描述超鏈接

ul#subjects 
    li 
     a(href="#") Subject: Here is the description of the subject 

該鏈接工作正常,但它涵蓋了整行文本。如何關閉超鏈接,使其在HTML中變得如下所示:請注意,「:」不在超鏈接中。

<ul id='subjects'> 
    <li><a href='#'>Subject</a>: Here is is the description of the subject 
</ul> 

謝謝。 :)

+0

爲將來的參考一個很好的工具:http://html2jade.org/ – InferOn 2014-09-22 07:16:29

+0

哇,漂亮的工具,男人。非常感謝。 – Lee 2014-09-22 07:17:42

回答

8

使用|在玉

例如顯示HTML文本

ul#subjects 
    li 
    a(href="#") Subject 
    | : Here is the description of the subject 
+0

太棒了!非常感謝。 – Lee 2014-09-22 07:16:42