This article mainly introduces the implementation of jquery graphics scrolling carousel, need friends can refer to the following
The complete item in the appendix code is as follows: <! DOCTYPE html> <html> <head> <title> picture switching </title> <script type= " Text/javascript "src=" js/jquery-1.11.0.min.js "></script> <script type=" Text/javascript "> var num = 0 $ (function () { $ ("Div ol li"). MouseOver (function (e) { $ (this). attr (' class ', ' current ' ); $ (this). Siblings (). attr ("Class", ""); Sibling node's class attribute is set to null //alert (' ul '). Index ()) num = $ (' ul '). Index () + 2 var index = $ (this). index (); Record selected Li tags in ul index //Picture cascading phenomenon in order to display the current picture, set the current picture's z-index value to be larger than the other sibling element $ ("Div ul li"). EQ (index). css ({" Left ":" 650px "," ZIndex ": num}) $ (" DIV-ul li "). EQ (index). siblings (). CSS (" ZIndex ", num-1); //animation effects, pictures from right fly into $ ("Div ul li"). EQ (index). Animate ({left: "0"},500) }); }); </script> & Lt;style type= "Text/css" > *{margin:0px;padding:0px;border:0px;} Ul,ol{list-style:none;} All{width:650px;height:250px;margin:100px auto;position:relative;border:1px solid Crimson;overflow:hidden;} All ul{position:relative;z-index:1;position:relative; /* son of */ . All UL li{position:absolute;left:0;top:0px; all ol{position:absolute;z-index:2; right:10px;bottom:10px; All ol li{width:20px;height:20px;background: #333 border:1px solid #509629;font-weight: bold;text-align : center;line-height:20px;float:left;margin-left:10px;margin-top:10px;} all ol. current{width:30px;height:30px;line-height:30px;border:1px Solid red;margin-top:0px; cur Sor:pointer;} </style> </head> <body> <div class= "All" > <ul> <li><img src= "src/1.jpg"/></li> <li><img src= "Src/2.jpg"/></li> <li><img src= "src/3.jpg"/></li> <li><img src= "Src/4.jpg"/></li> </ul> <ol> <li class= "current" >1</li> <li>2</li> <li>3</li> <li>4</li> </ol> </div> </body> </html>