0
滾動我想實現一個側滾動圖像滑塊像一個發現HERE水平圖像使用查詢
我不能讓我的圖片滾動像本例中的一個的。這僅適用於iPhone屏幕分辨率。
這裏是我的代碼:http://jsfiddle.net/AYj6w/
<script type="javascript">$(document).ready(function() {
$('#product-image').mousewheel(function(e, delta) {
this.scrollLeft -= (delta * 40);
e.preventDefault();
});
});
</script>
<ul id="scroller">
<li><img src="img/products/black-couch.jpg"></li>
<li><img src="img/products/brown-couch.jpg"></li>
<li><img src="img/products/red-couch.jpg"></li>
</ul>
#scroller {
float: left;
width: 90%;
height: 77px;
}
#scroller ul {
width: 100%;
}
#scroller li {
list-style: none;
float: left;
width: 122px;
height: 71px;
}
#scroller img {
width: 100%;
height: 100%;
float: left;
}