老师请您帮忙看一下代码谢谢
相关代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
padding:0px;
margin:0px;
}
.box{
width:650px;
height:360px;
margin:50px auto;
border: 1px solid #000;
position: relative;
}
.box ul{
width:5000px;
list-style: none;
left:0px;
position: relative;
/* transition: left 1s ease 0s; */
}
.box ul li{
float:left;
}
.leftbtn{
width:30px;
height:30px;
background-color: red;
border: 1px solid #000;
text-decoration: none;
border-radius: 50%;
position: absolute;
left:20px;
top:50%;
margin-top:-25px;
font-size: 25px;
color:white;
text-align: center;
line-height: 30px;
}
.rightbtn{
width:30px;
height:30px;
background-color: red;
border: 1px solid #000;
text-decoration: none;
border-radius: 50%;
position: absolute;
right:20px;
top:50%;
margin-top:-25px;
font-size: 25px;
color:white;
text-align: center;
line-height: 30px;
}
</style>
</head>
<body>
<div class="box"id="box">
<ul class="list"id="list">
<li><img src="image/hudie.jpg"width="650px"height="360"></li>
<li><img src="image/huoshaoyun.jpg"width="650px"height="360"></li>
<li><img src="image/jiudian.jpg"width="650px"height="360"></li>
<li><img src="image/shanshui.jpg"width="650px"height="360"></li>
<li><img src="image/wangzixuan1.jpg"width="650px"height="360"></li>
</ul>
<a href="javascript:;"class="leftbtn"id="leftbtn"><</a>
<a href="javascript:;"class="rightbtn"id="rightbtn">></a>
</div>
</body>
<script>
var leftbtn=document.getElementById('leftbtn');
var rightbtn=document.getElementById('rightbtn');
var list=document.getElementById('list');
//当前ul left的值
var left=0;
</script>
</html>老师我想请您帮忙检查一下代码,为什么我做的这个没有一丁点的效果
7
收起
正在回答 回答被采纳积分+1
相似问题
登录后可查看更多问答,登录/注册
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星