多谢楼上的大哥。具体说,有left 和 top 两个属性,怎么写?我不知道在js里如何引用ps:还有好多东西不知道如何引用。每次都google.找不到就没的办法。在哪能查到?

解决方案 »

  1.   

    <table>
    <tr>
    <td id="Map" style="background-image:url(http://community.csdn.net/logo/images/prj.210.67.gif); background-position:120px; background-repeat:no-repeat;">
    &nbsp;sdfsdfsdf
    </td>
    </tr>
    </table>
    <script language=javascript>
    document.getElementById("Map").style.backgroundPosition="0px"
    </script>
      

  2.   

    吐血大哥我要设置成"left:-20px top:-10px"
      

  3.   

    LEFT设置X的那个,TOP设置Y
    <table style="width:100%">
    <tr>
    <td id="Map" style="background-image:url(http://community.csdn.net/logo/images/prj.210.67.gif); background-position:120px; background-repeat:no-repeat;">
    &nbsp;sdfsdfsdf
    </td>
    </tr>
    </table>
    <script language=javascript>
    document.getElementById("Map").style.backgroundPositionX="100px"
    document.getElementById("Map").style.backgroundPositionY="0px"
    </script>
      

  4.   

    Map.style.backgroundPosition,我直接设置Map.style.backgroundPosition = "-20px -10px";,没反应。我在后面加了left,Left,posLeft,offsetLeft,没一个能访问的。