1 <!DOCTYPE html>
 2 <html>
 3 <head lang="en">
 4     <meta charset="UTF-8">
 5     <title></title>
 6     <style>
 7         *{
 8             margin: 0px;
 9             padding: 0px;
10         }
11         .div{
12             font-size: 12px;
13             width: 200px;
14             height: 100px;
15             text-align: center;
16             line-height: 50px;
17             position: absolute;
18             border: solid 1px;
19         }
20         #d{
21             position: absolute;
22             right: 20px;
23         }
24     </style>
25     <script src="js/system.js"></script>
26 </head>
27 <body>
28 <div style="position: relative;width: 200px;height:300px;overflow: hidden;border: solid 1px red;margin: auto">
29     <div id="d">
30         <div class="div" id="dong">
31             我在动1
32         </div>
33         <div class="div" id="dong1" style="left:202px">
34             我在动2
35         </div>
36         <div class="div" id="dong2" style="left:404px">
37             我在动3
38         </div>
39     </div>
40 </div>
41 <script type="text/javascript">
42     var r=0;
43     var objS=setInterval(
44             function(){
45                 r++;
46                 $$("d").style.right=r+"px";
47                 if(r>=400){
48                     clearInterval(objS);
49                 }
50             },10)
51 </script>
52 </body>
53 </html>