Class 和 ID
在 HTML 裡面,你會透過 <div class="item">
來替你的 div
定義類別,
或者是透過 <div id="Hello">
來定義一個名為 Hello
的 ID 給這個 div
,
不過在 Avane 中我們建議你透過 Avane 標籤進行撰寫。
Avane
.item
嗨!這是一個帶有 .item 的 Div!
#Hello
我是一個 ID 叫 Hello 的 Div!
section#World
我是一個 ID 叫 World 的 Section!
input.primary(type='text')
渲染結果
<div class="item">
嗨!這是一個帶有 .item 的 Div!
</div>
<div id="Hello">
我是一個 ID 叫 Hello 的 Div!
</div>
<section id="World">
我是一個 ID 叫 World 的 Section!
</section>
<input class="primary" type="text">