有没有办法使用现有的类将现有的6行表转换为2行3列。我没有访问html文件。只能将样式表添加到现有类
<table cellspacing="0">
<tbody><tr>
<td class="class1"><label for="radio0">
<input type="radio" checked="" value="1" name="name" id="radio0">1
</label></td>
</tr>
<tr>
<td class="class2"><label for="radio1">
<input type="radio" value="8" name="name" id="radio1">2
</label></td>
</tr>
<tr>
<td class="class3"><label for="radio2">
<input type="radio" value="12" name="name" id="radio2">3
</label></td>
</tr>
<tr>
<td class="class4"><label for="radio3">
<input type="radio" value="4" name="name" id="radio3">4
</label></td>
</tr>
<tr>
<td class="class5"><label for="radio4">
<input type="radio" value="7" name="name" id="radio4">5
</label></td>
</tr>
<tr>
<td class="class6"><label for="radio5">
<input type="radio" value="5" name="name" id="radio5">6
</label></td>
</tr>
</tbody></table>
答案 0 :(得分:0)
你总是可以将元素定位为绝对元素,但是我想警告你它可能不会保持一致......而且这只是改变了CSS。示例是here
CSS:
.class3{
position:absolute;
margin-left: 40px;
top: 9px;
}
.class4{
position:absolute;
margin-left: 40px;
top: 30px;
}
.class5{
position:absolute;
margin-left: 80px;
top: 9px;
}
.class6{
position:absolute;
margin-left: 80px;
top: 30px;
}