日期:2014-05-16  浏览次数:20372 次

图片滚动问题(JS+CSS)
就是http://www.cns114.cn/www/walkontrade/里的左下脚图片滚动,,在向上滚动到第三张的时候就可以看到不能对齐了,而且越往上差距越多..哪位大侠帮我啊..是什么原因,一直找不出..


------解决方案--------------------
问题不大,把中间的代码里的换行都去掉就可以了
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "jordan 1 " src= "uploadfiles/200722616322531.jpg " border= "0px "/> </div>
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "jordan 1 001 " src= "uploadfiles/2007226163234872.jpg " border= "0px "/> </div>
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "jordan 1 002 " src= "uploadfiles/2007226163743771.jpg " border= "0px "/> </div>
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "jordan 1 009 " src= "uploadfiles/2007226164241395.jpg " border= "0px "/> </div>
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "jordan 3 015 " src= "uploadfiles/20072262247294.jpg " border= "0px "/> </div>
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "BAPE-HOODY 001 " src= "uploadfiles/200722719404486.jpg " border= "0px "/> </div>
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "BAPE-HOODY 002 " src= "uploadfiles/2007227202521652.jpg " border= "0px "/> </div>
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "BAPE-HOODY 003 " src= "uploadfiles/2007227202817118.jpg " border= "0px "/> </div>
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "BAPE-HOODY 004 " src= "uploadfiles/2007227202911812.jpg " border= "0px "/> </div>
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "BAPE-HOODY 005 " src= "uploadfiles/2007227203033684.jpg " border= "0px "/> </div>
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "BAPE-HOODY 006 " src= "uploadfiles/2007227203137652.jpg " border= "0px "/> </div>
<div style= "margin:10px; padding:0px; "> <img height= "150px " alt= "BAPE-HOODY 007 " src= "uploadfiles/2007227203245200.jpg " border= "0px "/> </div>

不去掉换行,div的offsetHeight是176,去掉后是170,上个margin:10px,正好div图片是150