我想实现这样一个效果图片宽1600,我想适应不同的分辨率浏览器不管分辨率多大,图永远居中如,分辨率是 1024X768(比图小),那么图片就显示1024px,并且是显示图中间的内容,多余的不显示,没有横向滚动条
楼主要的是不是这个效果,代码没测试过,楼主自测。
左右能居中,垂直暂时不能的
这个我已经设置了,超过1600px,图片不会放大,而是居中您可能没明白我的具体问题,如果浏览器小于1024px,图片不缩小,而是显示中间那部分