我想顯示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>
那麼你爲什麼不使用? –
對不起,我不明白你的意思是圖像高度必須保持?你想要一個表格單元的高度必須是原始圖像的高度? –