三上悠亚中文观看在线,人妻日韩一区二区三区四区,免费在线观看国产一区二区三区 http://www.xtqte14.cn/blog 中山php|最優(yōu)網(wǎng)絡(luò) Mon, 13 May 2013 04:56:43 +0000 en hourly 1 http://wordpress.org/?v=3.1.4 HTML表單里面使用fieldset,legend標(biāo)簽,實(shí)現(xiàn)標(biāo)題浮在邊線上的效果 http://www.xtqte14.cn/blog/view-127.html http://www.xtqte14.cn/blog/view-127.html#comments Mon, 15 Aug 2011 01:58:53 +0000 lin http://www.xtqte14.cn/blog/?p=127 經(jīng)常看到一些表單會(huì)有一種相同的特殊效果,就是表單說明文字會(huì)浮在邊線上,可以用css控制實(shí)現(xiàn),但是其實(shí)html有一個(gè)fieldset標(biāo)簽來實(shí)現(xiàn)這效果
HTML <fieldset> 標(biāo)簽

定義和用法

fieldset 元素可將表單內(nèi)的相關(guān)元素分組。

<fieldset> 標(biāo)簽將表單內(nèi)容的一部分打包,生成一組相關(guān)表單的字段。

當(dāng)一組表單元素放到 <fieldset> 標(biāo)簽內(nèi)時(shí),瀏覽器會(huì)以特殊方式來顯示它們,它們可能有特殊的邊界、3D 效果,或者甚至可創(chuàng)建一個(gè)子表單來處理這些元素。

<fieldset> 標(biāo)簽沒有必需的或唯一的屬性。

<legend> 標(biāo)簽為 fieldset 元素定義標(biāo)題。

實(shí)例

組合表單中的相關(guān)元素:

<form>

<fieldset>

<legend>health information</legend>

height: <input type="text" />

weight: <input type="text" />

</fieldset>

</form>
實(shí)現(xiàn)效果如下

health information

height:

weight:

還可以用css控制邊線的樣式和legend的樣式。

<form>

<fieldset>

<legend>health information</legend>

height: <input type="text" />

weight: <input type="text" />

</fieldset>

</form>

]]>
http://www.xtqte14.cn/blog/view-127.html/feed 293