1.把body的width、height属性去掉

2.在页面头部添加

 <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-

scale=0.5, maximum-scale=2.0, user-scalable=yes" />

3.<script type="text/javascript">
        $(function () {
            init();
        });
        function init() {
            var jian = 30;
            var w = document.body.clientWidth - jian;
            var pic = document.getElementsByTagName("img");
            for (var i = 0; i < pic.length; i++) {
                var width1 = pic[i].width;
                var height1 = pic[i].height;
                if (width1 > w) {
                    pic[i].width = w;
                    pic[i].height = height1 * w / width1;
                }
            }
        }
</script>