Document
*{margin: 0px;padding: 0px;}
ul{width: 10000px;height: 50px;left: 0px; position: relative; list-style: none;transition: width 0.5s;-moz-transition: left 0.5s;-webkit-transition: left 0.5s;-o-transition: left 0.5s;background: deepskyblue;}
li{width: 100px; height: 50px;border-right:1px solid black;text-align: center; line-height: 50px;font-size: 14px;cursor: pointer; float: left;background: deepskyblue;}
- 第1项
- 第2项
- 第3项
- 第4项
- 第5项
- 第6项
- 第7项
- 第8项
- 第9项
- 第10项
- 第11项
- 第12项
var currentElement,frontElement,parent,screen_width,child_offset,childWidth;
frontElement = document.getElementById('id1');
childWidth = frontElement.clientWidth;
frontElement.style.color = &