表格: thead 表頭 tbody 表體 tfoot 表尾 th 列標題,預設居中加粗的td caption 表格表體,預設左右居中 colgroup span="num" 列分組 表格屬性: border-spacing:單元格間距,必須給table添加 border-collapse:coll ...
- 表格:
thead 表頭
tbody 表體
tfoot 表尾
th 列標題,預設居中加粗的td
caption 表格表體,預設左右居中
colgroup span="num" 列分組
- 表格屬性:
border-spacing:單元格間距,必須給table添加
border-collapse:collapse; 合併邊框線,必須給table添加
border-collapse:separate; 預設值,不合併
empty-cells:show;無內容單元格,展示
empty-cells:hide;無內容單元格,隱藏
table-layout:fixed;單元格寬度固定(寬度不固定)
table-layout:auto;預設值,自適應,寬度不固定
- 表單:
action:"提交地址";
method:"提交方式"; post/get
name:"表單名稱";
input
type="radio" 單選按鈕
【註】同一組的name屬性值必須一致才能達到互斥的效果
checked="checked"預設選中
type="checkbox" 多選按鈕
【註】name值不需要一致
disabled="disabled" 禁止選中
checked="checked" 預設選中
label綁定選中標簽
【例】
<input type="radio" value="xx" name="sex" id="bj">
<label for="bj">哈哈</label>
select>option 下拉列表>下拉列表項
selected="selected"預設選中下拉
textarea多行文本輸入框
cols="" 改變元素寬
rows="" 改變元素高
【註】不是px為單位,指的是容納字元數,但是有偏差,可以通過樣式修改大小
【註】預設可以拖拽大小;
resize:"none"; 禁止拖拽
fieldset>legend 表單欄位集>表單欄位集標題
【註】一個filedest里只有一個直接的legend,可以有多個fieldest
fieldest嵌套寫法
<fieldset id="">
<legend></legend>
<fieldset id="">
<legend></legend>
</fieldset>
</fieldset>