html+css學習筆記 5[表格、表單]

來源:互聯網
上載者:User

標籤:color   strong   io   for   問題   html   ar   line   

表格 —— 預設樣式重設

表格標籤:
    table 表格
    thead 表格頭
    tbody 表格主體
    tfoot 表格尾
    tr 表格行
    th 元素定義表頭
    td 元素定義表格單元

表格樣式重設
table{border-collapse:collapse;} 儲存格間隙合并
th,td{padding:0;}重設儲存格預設填充

 

儲存格合并


rowspan  屬性規定儲存格可橫跨的行數。
    <td rowspan="2"></td>

colspan  屬性規定儲存格可橫跨的列數。
    <td colspan="2"></td>

表單/表單元素

form   表單
<input type="…… " name="" value="" />
text              文字框
password     密碼
radio            單選
checkbox     複選
submit         提交
reset            重設
button         按鈕
image          圖片
file               上傳
hidden         隱藏

表單元素

label  標籤為 input 元素定義圖說文字
    <input type="checkbox" name="" id="a"/>
    <label for="a">……</label>


checked  在頁面載入時預設選定的 input 元素。
    <input type="checkbox" name="" checked/>

disabled  屬性規定應該禁用 input 元素。
    <input type="checkbox" name="" disabled/>

elect/option 下拉選框
    對高度的支援不相容;


textarea      文本域
    各個瀏覽器下的預設捲軸顯示不相容
    css3新增 resize 調整尺寸屬性;
   

輪廓線 表單元素相容性問題

outline 輪廓線;
A標籤輪廓線去除方法:
1、<a href="#" onfocus="this.blur();">……</a>
2、<a href="#" hidefocus>……</a>


表單元素相容性問題
    IE6下input背景滾動;

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.