本帖最后由 u012721633 于 2013-11-07 12:09:48 编辑

解决方案 »

  1.   


    <table>
    <tr >
    <td style="position: relative; width: 100px; height:100px;border: 1px solid #0050D0;background: #96E555; overflow:hidden; cursor: pointer">
    <div id="d1" style="position:absolute; left:0px; width:100%; height:100%;">123</div>
    </td>
    <td>abc</td>
    </tr>
    </table>function hid(){
    $("#d1").animate({left:"-100px"});
    }
      

  2.   

    设置table的margin-left<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <style>
    body{margin:0px}
    </style>
    <script>
        function hid() {
            $("#d1").animate({ "margin-left": "-102px" });
        }
    </script>
    <table id="d1" cellpadding="0" cellspacing="0"><tr ><td style="position: relative; width: 100px; height:100px;border: 1px solid #0050D0;background: #96E555; cursor: pointer">123</td><td>abc</td></tr></table>
    <input type="button" onClick="hid()">