Table 表单样式

时间:2022-01-17 10:59:13

<style>
table th
{
white-space: nowrap;
background-color: #f5f5f5;
height:30px;
font-size:14px;
font-weight:lighter; /*细*/

text-align:right ! important

}
.chk
{
white-space: nowrap;
text-overflow:ellipsis;/*省略*/
}
table td
{
/*word-break:keep-all;*/
white-space:nowrap; /*不换行*/
text-overflow:ellipsis;
}
</style>

<table border="1" bordercolor="#a0c6e5" style="border-collapse: collapse; width: auto">
<tr>
<th>
测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;" >
<input type="text" value="" placeholder="Valid Email Address" />
<input type="button" value="submit"/>
</td>
<th>
测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" placeholder="Valid Email Address" />
</td>
<th>
测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" placeholder="Valid Email Address" />
</td>
<th>
测试:测试:测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" placeholder="Valid Email Address" />
</td>
<th>
测试:测试:测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" placeholder="Valid Email Address" />
</td>
<th>
测试:测试:测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;" class="chk">
<input type="checkbox" />

<input type="checkbox" />

</td>
</tr>
<tr>
<th>
测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" />
</td>
<th>
测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" />
</td>
<th>
测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" />
</td>
<th>
测试:测试:测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" />
</td>
<th>
测试:测试:测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" />
</td>
<th>
测试:测试:测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;" class="chk">
<input type="checkbox" />

<input type="checkbox" />

</td>
</tr>
<tr>
<th>
测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" />
</td>
<th>
测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" />
</td>
<th>
测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;">
<input type="text" value="" />
</td>
<th>
测试:测试:测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;" colspan="3">
<input type="text" value="" style="width: 99%" />
</td>
<th>
测试:测试:测试:
</th>
<td style="border: solid 1px #a0c6e5; height: 20px;" class="chk">
<input type="checkbox" />

<input type="checkbox" />

<input type="checkbox" />

</td>
</tr>
</table>