婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > 網頁設計之5種簡單的XHTML網頁表單

網頁設計之5種簡單的XHTML網頁表單

熱門標簽:中國世界文化遺產地圖標注 可以集成到系統的外呼 荊州銷售電銷機器人 電腦外呼系統安裝 外呼系統隱私 電話外呼系統怎么找準客戶 揚州市地圖標注 400開頭電話在哪辦理 西安公司外呼系統價格

網頁設計之5中簡單的XHTML網頁表單。 技術1:標簽三明治
將輸入框,選擇框和文本框全部包含進 label 元素,并全部設置為塊級元素。將單選按鈕和多選框顯示方式設置為 inline 以便于它們在同一行出現。如果你比較喜歡 label 和單選按鈕/多選框出現在不同行,可以選擇不把它包含在 label 里面,或者使用硬換行處理。
每種情況都在下面展示了。

當這些看起來比較時髦的時候,W3C 事實上已經含蓄地展示了他們的 label 例子。
主要好處:簡單
代碼:
label, input, select, textarea {display: block;} label {margin-bottom: 10px;} input[type="radio"], input[type="checkbox"] {display: inline;} <form> <fieldset> <legend>Contact Form</legend> <label for="name"> Name</label> <input id="name" name="name" size="20" /> <label for="email">Email</label> <input id="email" name="email" size="20" /> <label for=" Choices"> Choices (radio) — <em>wrapped label</em></label> <input name=" Choice" type="radio" /> Choice 1 <input name=" Choice" type="radio" /> Choice 2 <input name=" Choice" type="radio" /> Choice 3 <label style="margin-bottom: 0pt;" for=" Choices2"> Choices (checkbox) — <em>non-wrapped label, margin reset</em></label> <input name=" Choice2" type="checkbox" /> Choice 1 <input name=" Choice2" type="checkbox" /> Choice 2 <input name=" Choice2" type="checkbox" /> Choice 3 <div style="height: 10px;"><!-- just to split the demo up --></div> <label for=" Choices3"> Choices (checkbox) — <em>wrapped, hard line-break</em></label> <input name=" Choice3" type="checkbox" /> Choice 1 <input name=" Choice3" type="checkbox" /> Choice 2 <input name=" Choice3" type="checkbox" /> Choice 3 <label for="dropdown"> Question</label> <select id="dropdown"> <optgroup label="Group of Options"></optgroup> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> </select> <label for="message"> Message <textarea cols="36" rows="12" name="message"></textarea> </label> <input type="submit" value="send it" /> </fieldset> </form>
運行結果
#expamle1 label,#expamle1 input,#expamle1 select,#expamle1 textarea {display: block;}
#expamle1 label {margin-bottom: 10px;}
#expamle1 input[type="radio"],#expamle1 input[type="checkbox"] {display: inline;}
技術2:懶人
許多開發者采用了這種不正統但是快速簡單(用換行隔斷標記)的方法。雖然能運行,但是對你的 css 能力有害,因為你不需要任何 css 去實現它。
主要好處:快速
代碼:
<form> <fieldset> <legend>Contact Form</legend> <label for="name">Name</label> <input id="name" name="name" size="20" /> <label for="email">Email</label> <input id="email" name="email" size="20" /> <label for=" Choices"> Choices (radio)</label> <input name=" Choice" type="radio" /> Choice 1 <input name=" Choice" type="radio" /> Choice 2 <input name=" Choice" type="radio" /> Choice 3 <label for=" Choices3"> Choices (checkbox)</label> <input name=" Choice3" type="checkbox" /> Choice 1 <input name=" Choice3" type="checkbox" /> Choice 2 <input name=" Choice3" type="checkbox" /> Choice 3 <label for="dropdown">Question</label> <select id="dropdown"> <optgroup label="Group of Options"></optgroup> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> </select> <label for="message">Message</label> <textarea cols="36" rows="12" name="message"></textarea> <input type="submit" value="send it" /> </fieldset> </form>
運行結果
上一頁12 下一頁 閱讀全文

標簽:樂山 錫林郭勒盟 白銀 濟南 阿拉善盟 延安 貴陽 四川

巨人網絡通訊聲明:本文標題《網頁設計之5種簡單的XHTML網頁表單》,本文關鍵詞  網頁設計,之,5種,簡單,的,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《網頁設計之5種簡單的XHTML網頁表單》相關的同類信息!
  • 本頁收集關于網頁設計之5種簡單的XHTML網頁表單的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 武清区| 黎城县| 姚安县| 万荣县| 手机| 乌鲁木齐市| 伊通| 哈巴河县| 平安县| 遂川县| 青川县| 祁门县| 黔东| 田阳县| 浪卡子县| 双江| 永清县| 丹巴县| 安西县| 西平县| 临洮县| 丁青县| 正蓝旗| 龙泉市| 大港区| 资阳市| 海南省| 洪泽县| 宜都市| 竹山县| 乌苏市| 慈利县| 东兴市| 正阳县| 福安市| 竹山县| 余庆县| 长岭县| 西昌市| 五台县| 鹤山市|