HTML页面,简单的图片无缝滚动特效(向左,向右,暂定),通过speed来控制。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>网页图片无缝滚动-JavaScript</title>
<style type="text/css">
#div1{
width: 1200px;
height: 169px;
margin: 100px auto;
position: relative; /*相对定位*/
/*background: red;*/
overflow: hidden;
}
#div1 ul{
width: 1280px;
padding-left: 0;
position: absolute; /*绝对定位*/
left: 0;
top: 0;
margin-top:0;
margin-bottom: 0;
}
#div1 ul li{
width: 300px;
height: 169px;
/*margin-left: 20px;*/
float: left;
list-style: none;
}
</style>
<script type="text/javascript">
window.onload = function(){
var oDiv = document.getElementBy