Example: http://www.lcefox.com.cn//page/single/mousemove/
ScrollLeft, usually we are relatively less use, but not often use does not mean that can not be used, in fact, exercise properly can save a lot of code
<! DOCTYPE html>
<meta charset= "UTF-8" >
<title></title>
<script type= "Text/javascript" src= "Jquery-1.8.3.min.js" ></script>
<style type= "Text/css" >
*{margin:0;padding:0;}
Html,body{width:100%;height:100%;overflow:hidden;}
Ul{list-style:none;}
li{float:left;width:180px;height:120px;opacity:0.8;}
Li:hover{opacity:1;}
. box{margin:200px Auto;height:180px;width:720px;overflow:hidden;}
</style>
<body>
<div class= "box" >
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
<script type= "Text/javascript" >
$ (function () {
var extra=800;
var $inner =$ ("ul");
var $outer =$ (". box");
var Lastelem = $inner. Find (' img:last ');
var divwidth= $outer. Width ();
$outer. scrollleft (0);
$inner. Width ($ ("Li"). Width () *$ ("Li"). width ());
$outer. Unbind (' MouseMove '). Bind (' MouseMove ', function (e) {
var left= e.clientx-$outer. Offset (). left;//the current mouse position minus the left side of the outermost div
$outer. ScrollLeft (left);//Intra-node scrolling
$outer. ScrollLeft (left);});
});
</script>
</body>
ScrollLeft () Magical mouse move reverse direction picture scrolling