在Photoshop中保存为网页切片页面在IE中看起来很糟糕

时间:2012-10-17 07:43:00

标签: html css

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

IE:

IE

Firefox, Chrome & Safari: 

Firefox

代码:

<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>

2 个答案:

答案 0 :(得分:3)

尝试将其放入您的css文件

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

或在head标签中写

<style type="text/css">
    img {
       border:0;
       padding:0;
       margin:0;
    }
</style>

答案 1 :(得分:1)

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

关于Matei Mihai的答案你也应该加上这个:

img {
   border:0;
   padding:0;
   margin:0;
   display:block; /* This often removes extra spacing around images in IE */
}