2014-05-10 61 views
1

我有這樣的HTML從SemanticUI其中顯示文本的用戶圖標的右側:玉模板從SemanticUI

<h1 class="ui header"> 
    <i class="user icon"></i> 
    Create Your Account 
</h1> 

,我試圖重新產生這種用玉:

h1.ui.header 
    i.user.icon 
    Create Your Account 

但是,這不能正常工作,因爲我認爲Jade需要某種類型的html標籤才能正常工作,並且「Create Your Account」行沒有。

所以我想這太:

h1.ui.header 
    i.user.icon 
    span Create Your Account //also with div and p but these are display:block so no luck 

但「創建帳戶」的文字出現在用戶圖標的下方,我需要它,在右側出現。

回答

1

在其他把文字用玉模板標籤後,您需要使用管道符號:

h1.ui.header 
    i.user.icon 
    | Create Your Account 

會生成:

<h1 class="ui header"><i class="user icon"></i>Create Your Account</h1> 

,您可以嘗試在jade demo page

希望這會有所幫助。