1

我通过Photoshop制作网页,将其切片并保存为网络并上传html文件。它在 Firefox 和 Chrome 中看起来还不错,但 IE 则完全不同。任何人都知道如何修复它以及为什么我会得到这个黑色填充?

IE:

IE

Firefox, Chrome & Safari: 

火狐

代码:

<html>
<head>
<title>Shamir Applications</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
</head>
<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (Webpage08.psd) -->
<table id="Table_01" width="960" height="720" border="0" cellpadding="0" cellspacing="0"  style="margin-right: auto; margin-left: auto;">
    <tr>
        <td colspan="11">
            <img src="images/Webpage08_01.png" width="960" height="237" alt=""></td>
    </tr>
    <tr>
        <td rowspan="6">
            <img src="images/Webpage08_02.png" width="130" height="483" alt=""></td>
        <td>
            <img src="images/Webpage08_03.png" width="138" height="36" alt=""></td>
        <td rowspan="6">
            <img src="images/Webpage08_04.png" width="142" height="483" alt=""></td>
        <td colspan="3">
            <img src="images/Webpage08_05.png" width="138" height="36" alt=""></td>
        <td rowspan="6">
            <img src="images/Webpage08_06.png" width="140" height="483" alt=""></td>
        <td colspan="3">
            <img src="images/Webpage08_07.png" width="138" height="36" alt=""></td>
        <td rowspan="6">
            <img src="images/Webpage08_08.png" width="134" height="483" alt=""></td>
    </tr>
    <tr>
        <td rowspan="5">
            <img src="images/Webpage08_09.png" width="138" height="447" alt=""></td>
        <td colspan="3">
            <img src="images/Webpage08_10.png" width="138" height="13" alt=""></td>
        <td colspan="3">
            <img src="images/Webpage08_11.png" width="138" height="13" alt=""></td>
    </tr>
    <tr>
        <td rowspan="2">
            <img src="images/Webpage08_12.png" width="14" height="146" alt=""></td>
        <td>
            <img src="images/Webpage08_13.png" width="110" height="110" alt=""></td>
        <td rowspan="2">
            <img src="images/Webpage08_14.png" width="14" height="146" alt=""></td>
        <td rowspan="4">
            <img src="images/Webpage08_15.png" width="16" height="434" alt=""></td>
        <td>
            <img src="images/Webpage08_16.png" width="110" height="110" alt=""></td>
        <td rowspan="4">
            <img src="images/Webpage08_17.png" width="12" height="434" alt=""></td>
    </tr>
    <tr>
        <td>
            <img src="images/Webpage08_18.png" width="110" height="36" alt=""></td>
        <td rowspan="3">
            <img src="images/Webpage08_19.png" width="110" height="324" alt=""></td>
    </tr>
    <tr>
        <td colspan="3">
            <img src="images/Webpage08_20.png" width="138" height="17" alt=""></td>
    </tr>
    <tr>
        <td colspan="3">
            <img src="images/Webpage08_21.png" width="138" height="271" alt=""></td>
    </tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>
4

2 回答 2

3

尝试将其放入您的 css 文件中

img {
   border:0;
   padding:0;
   margin:0;
}

或在头部标签中写

<style type="text/css">
    img {
       border:0;
       padding:0;
       margin:0;
    }
</style>
于 2012-10-17T07:53:31.517 回答
1

您可以尝试从使用表格模式切换到使用 css 导出吗?

关于 Matei Mihai 的回答,您可能还应该添加以下内容:

img {
   border:0;
   padding:0;
   margin:0;
   display:block; /* This often removes extra spacing around images in IE */
}
于 2012-10-17T08:24:00.920 回答