Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 消除表行之间的空白_Html_Css - Fatal编程技术网

Html 消除表行之间的空白

Html 消除表行之间的空白,html,css,Html,Css,我正在尝试去除图片之间的红色背景。 如何使用css实现这一点 <table style="background-color:red; padding:0;margin:0;"> <tr> <td> <img src="/graphics/susSlogan.gif"> </td> &l

我正在尝试去除图片之间的红色背景。 如何使用css实现这一点

 <table style="background-color:red; padding:0;margin:0;">
            <tr>
                <td>
                    <img src="/graphics/susSlogan.gif">
                </td>
            </tr>
            <tr>
                <td>
                    <img src="/graphics/susSlogan.gif">
                </td>
            </tr>
        </table>

您希望更改元素上的填充。比如:

td{
    padding-bottom: 0;
}
你可以用

<table cellpadding="0"></table>
td {
    padding-bottom: 0px;
}

检查网页时,浏览器控制台应向您显示空间的组成,并将其设置为0。如果没有浏览器控制台,总是很难分辨。您可以尝试边框间距:0。