国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

characters

Foundation 表單


Foundation 表單控制會自動設(shè)置為全局樣式:

所有 <textarea>, <select><input> 元素寬度都為 100%,且?guī)в型膺吘?、?nèi)邊距、陰影喝鼠標(biāo)移動效果。

實(shí)例

<form>
??Input:
??<input?type="text"?placeholder="Name">

??Textarea:
??<textarea?rows="4"?placeholder="Address"></textarea>

??Select:
??<select>
????<option>1</option>
????<option>2</option>
????<option>3</option>
????<option>4</option>
??</select>
</form>
實(shí)例預(yù)覽 ?

標(biāo)簽

在表單中使用 <label> 元素來設(shè)置標(biāo)簽,標(biāo)簽可以添加 for 屬性和 id 屬性。用戶在點(diǎn)擊標(biāo)簽或輸入域時獲取輸入框焦點(diǎn):

實(shí)例

?<form>
??<label?for="name">Input
????<input?type="text"?placeholder="Name"?id="name">
??</label>

??<label?for="adr">Label
????<textarea?rows="4"?placeholder="Address"?id="adr"></textarea>
??</label>

??<label?for="num">Select
????<select?id="num">
??????<option>1</option>
??????<option>2</option>
??????<option>3</option>
??????<option>4</option>
????</select>
??</label>
</form>
實(shí)例預(yù)覽 ?

如果需要設(shè)置標(biāo)簽右對齊,可以使用 .right 類:

實(shí)例

<label?class="right">
實(shí)例預(yù)覽 ?

Fieldset

Foundation 渲染 <fieldset> 元素的樣式如下:

實(shí)例

<form>
??<fieldset>
????<legend>Fieldset?Legend</legend>
????<label>Name
??????<input?type="text"?placeholder="First?Name..">
????</label>
????<label>Email
??????<input?type="text"?placeholder="Enter?email..">
????</label>
??</fieldset>
</form>
實(shí)例預(yù)覽 ?

錯誤狀態(tài)

使用 .error 類來設(shè)置錯誤的標(biāo)簽、輸入框、文本框樣式:

實(shí)例

<form>
??<label?class="error">Error
????<input?type="text"?placeholder="Name..">
??</label>
??<small?class="error">Wrong?input</small>

??<textarea?rows="4"?placeholder="Address"></textarea>
??<small?class="error">Wrong?input</small>
</form>
實(shí)例預(yù)覽 ?
你需要使用 JavaScript 來更新用戶輸入的錯誤狀態(tài)。


關(guān)于我們 聯(lián)系我們 留言板

手冊網(wǎng)

Previous article: Next article: