本帖最后由 sd313489865 于 2012-06-21 08:57:16 编辑

解决方案 »

  1.   

    什么浏览器???-webkit-transform:scale(需要的比例水平方向和垂直方向)---webkit内核浏览器
    -moz-transform:scale----火狐
      

  2.   

    没人帮忙啊??这不是个非常常用的效果吗? HELP 
      

  3.   

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <script>
            function zzjs_net_open(e) { //胀大            if (document.getElementById(e).width <= 125) {                window.setTimeout("zzjs_net_open('" + e + "')", 3);
                    document.getElementById(e).width += 1;
                    document.getElementById(e).height += 1;
                }        }
            function zzjs_net_on(e) //缩小
            {
                var el = document.getElementById(e);
                if (el.width >= 100) {
                    window.setTimeout("zzjs_net_on('" + e + "')", 2);
                    el.width -= 1;
                    el.height -= 1;
                    el.style.marginTop = (el.parentNode.clientHeight - el.height) / 2 + "px";
                }
            }
        </script>
    </head>
    <body>
        <div style="width: 500px; height: 500px; text-align: center; border: 1px solid">
            <img id='a' src="3.jpg" onmouseover="zzjs_net_open('a')" onmouseout="zzjs_net_on('a')">
        </div>
    </body>
    </html>