Table
table属性
| 属性名 | 含义 | 常用属性值 |
|---|---|---|
| border | 设置表格的边框(默认border=‘0’无边框) | 像素值 |
| cellspacing | 设置单元格与单元格边框之间的空白间距 | 像素值默认是2像素 |
| cellpadding | 设置单元格内容与单元格边框之间的空白间距 | 像素值默认是1像素 |
| width | 表格宽度 | 像素值 |
| height | 表格高度 | 像素值 |
| align | 设置表格在网页中的水平对齐方式 | left、center、right |
表格标题
<table border='1' cellspacing='0' align='center'><caption>我是表格标题</caption><thead><tr><th><input type="checkbox" id='j_cbAll'></th><th>商品</th><th>价格</th></tr></thead><tbody id='j_tb'><tr><td><input type="checkbox"></td><td></td><td></td></tr></tbody></table>表格也可以使用css来设置边框table,td{border: 1px solid pink;border-collapse: collapse; //合并重叠的边框font-size: 14px;}
表格合并
行合并:rowspan 列合并:colspan
合并的思想:将多个内容合并的时候,就要有多余的东西,把它删除
例如把三个td合并成一个,那就多余了2个,需要删除
a、ul li,等的样式初始化
a {text-decoration: none;}ul {margin: 0px;padding: 0px;list-style: none;}input{background:none;outline:none;box-sizing:border-box;}input:focus :focus 选择器用于选取获得焦点的元素input:focus{border:none;}样式书写顺序display:position:top:left:width:height:margin:padding:下面的顺序就不重要了background-color:border:text-indent:
