当前位置: 首页 > Web前端 > CSS

day9 表单和表格的补充

时间:2023-03-31 00:57:33 CSS

day9 表单和表格的补充♀?♀1. 表单的补充(1) 单选框<input type='radio'> 单选内容type为radio, 代表单选框当name属性值一样时, 可以互斥绑定信息 lable标签, 点击字的时候, 也能选择到圈<label for="woman"> for属性指向id名 <input type="radio" name="sex" id="woman">女 </label>默认选择: checked (相当于 checked='checked')禁止选择: disabled(2) 多选框<input type='checkbox'> 多选内容 type为checkbox, 代表多选框(3) 下拉列表<select> <option>下拉内容</option></select>默认选择: selected(4) 多行文本域<textarea></textarea>禁止缩放textarea{ resize:none;}(5) 文件上传<input type='file'>(6) 表单字段集<fieldset> <legend>字段集标题</legend> 表单元素</fieldset>2. 表格的补充(1) 表格标题 caption(2) 表格列标题 th(3) 表格行分组 thead tbody tfoot<thead></thead> 表头 一般只有一组<tbody></tbody> 表体 可以有多组<tfoot></tfoot> 表尾 一般只有一组(4) 加在table身上的属性border-spacing: 数值+px边框之间的间距border-collapse: collapse合并边框线,变成细线边框table-layout: auto(自动)/fixed(固定)设置固定后,不让表格根据内容去撑大宽度,所以有利于浏览器加快运行速度