表格
table
tr 行
td 单元格
表格相关属性
width="" 宽
height="" 高
border="" 边框
bordercolor="" 边框颜色
bgcolor="" 背景颜色
cellspacing="" 单元格之间间距
cellpadding="" 内容到边框的间距
对齐方式
align="" 水平对齐
left center right
valign="" 垂直对齐
top middle bottom baseline
合并
colspan="" 列合并
rowspan="" 行合并
表单
input type=""
radio 单选框 必须有相同的name值
label
<input type="radio" name="sex" id="women"><label for="women">女</label>
<label> <input type="radio" name="sex">不清楚</label>
checkbox 复选框
checked 默认选中
disabled 禁用
<select> 下拉菜单
<option value="">内容1</option>
</select>
<textarea cols="" rows=""></textarea>
和文字对齐时 在textarea 上添加 vertical-align:;
BFC (Block formatting context)块级格式化上下文
触发条件
1.html
2.float 不为 none
3.position absolute fixed
4.display:; inline-block
5.overflow 不为visible
规则
1.垂直显示
2.margin上下重叠
3.子元素的margin-left 和 包含块的border-left 相接触
4.不与float块重叠
5.浮动元素的高度参与计算
6.独立封闭的容器
应用
1.两栏自适应
2.清除内部浮动
3.防止margin上下重叠