包含图像白色边框的表格(Chrome)

时间:2016-05-07 13:46:09

标签: html image css3 google-chrome twitter-bootstrap-3

编辑:它在Firefox中运行良好;它似乎只发生在chrome上。

我正在编写一个应用程序,要求我将图像分割成碎片并将其存储在表格中。为此,我使用以下(生成)html



.no-padding {padding: 0!important;}

<table class="table" id="game_puzzle">
    <tbody>
        <tr>
            <td class="no-padding"><img src="assets/images/kings of leon/5/0_0.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/0_1.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/0_2.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/0_3.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/0_4.png" style="width:100%">
            </td>
        </tr>
        <tr>
            <td class="no-padding"><img src="assets/images/kings of leon/5/1_0.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/1_1.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/1_2.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/1_3.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/1_4.png" style="width:100%">
            </td>
        </tr>
        <tr>
            <td class="no-padding"><img src="assets/images/kings of leon/5/2_0.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/2_1.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/2_2.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/2_3.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/2_4.png" style="width:100%">
            </td>
        </tr>
        <tr>
            <td class="no-padding"><img src="assets/images/kings of leon/5/3_0.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/3_1.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/3_2.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/3_3.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/3_4.png" style="width:100%">
            </td>
        </tr>
        <tr>
            <td class="no-padding"><img src="assets/images/kings of leon/5/4_0.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/4_1.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/4_2.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/4_3.png" style="width:100%">
            </td>
            <td class="no-padding"><img src="assets/images/kings of leon/5/4_4.png" style="width:100%">
            </td>
        </tr>
    </tbody>
</table>
&#13;
&#13;
&#13;

上述代码在大多数屏幕尺寸上看起来都很好,例如:

Working

但是在其他屏幕尺寸(不仅是较小尺寸)上看起来像这样:

Not working

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

你正在使用bootstrap框架吗?如果没有手动删除表格的边框,如下所示。

table, tr, th, td {
    border: 0;
}

你仍然面临着这个问题。请更新您的代码段。