2013-10-31 101 views
0

我有以下的HTML代碼正確HAML語法

<input type="radio" name="production23" id="account-production-yes23"> 
<label for="account-production-yes23">Yes</label> 

和html2haml轉換器及其相應的HAML語法給我

%input#account-production-yes23{name: "production23", type: "radio"}/ 
%label{for: "account-production-yes23"} Yes 

它的工作原理,但我想知道在該行什麼/意思

%input#account-production-yes23{name: "production23", type: "radio"}/ 

回答

1

Haml.info

正斜槓字符放置在標記定義的末尾時,會導致Haml將其視爲空(或空)元素。根據格式的不同,該標籤將不帶結束標籤(:html4或:html5),或者作爲自動結束標籤(:xhtml)。