<!DOCTYPE html> <html lang="ja-JP"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,user-scalable=yes,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.5"> <title></title> <link rel="stylesheet" href="css/ad.css" media="all" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script> $(function(){ $("img").click(function(){ $("span:not(:animated)").animate({marginRight:"-600px"},"500ms","swing",function(){ $("img:last-of-type").prependTo("span"); $("span").css("margin-right","-800px"); }); }); }); </script> <style> img{ cursor:pointer; float:right; } div{ float:left; width:200px; height:200px; /*overflow:visible;*/ overflow:hidden; } span{ float:right; display:block; width:1000px; margin-right:-800px; } </style> </head> <body> <div> <span> <img src="img/image5.png"> <img src="img/image4.png"> <img src="img/image3.png"> <img src="img/image2.png"> <img src="img/image1.png"> </span> </div> </body> </html>