我想显示checkbox
而不是图像(图像必须隐藏在每一行中)。另一个问题是height
为图像保留的空间必须与图像相同,但width
必须是30px(图像的高度是动态的,所以我不知道它)。如果复选框位于为图像保留的空间的中心,这将是理想的。是否有可能做到这一点?显示复选框而不是图像
Here是示例和代码:
<table>
<thead>
<th>Image</th>
</thead>
<tr>
<td><img src='http://i.imgur.com/cddKZVx.jpg'><input type='checkbox'></td>
</tr>
<tr>
<td><img src='http://i.imgur.com/cddKZVx.jpg'><input type='checkbox'></td>
</tr>
<tr>
<td><img src='http://i.imgur.com/cddKZVx.jpg'><input type='checkbox'></td>
</tr>
<tr>
<td><img src='http://i.imgur.com/cddKZVx.jpg'><input type='checkbox'></td>
</tr>
<tr>
<td><img src='http://i.imgur.com/cddKZVx.jpg'><input type='checkbox'></td>
</tr>
</table>
那么你为什么不使用? –
对不起,我不明白你的意思是图像高度必须保持?你想要一个表格单元的高度必须是原始图像的高度? –