level 3
Debug大神666
楼主
【笔记】自动轮播图片
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.win{
width:700px;height:300px;border:1px solid #ccc;margin:20pxauto;position:relative;
overflow: hidden;
}
.title{
width:100%;height:30px;background:#eee;position: relative;
}
.title a{
/*padding:0 30px;*/width:20%;height:100%;float:left;text-align:center;line-height: 30px;font-size: 15px;color:#009797;text-decoration:none;position: relative;z-index: 1;
}
.title .float{
width:20%;height:100%;background: #009797;position: absolute;
}
.box{
width:100%;height:270px;position: relative;
}
.box div{
width:100%;height: 100%;position: absolute;left:-100%;font-size:70px;text-align: center;line-height: 270px;top:0;color:#fff;
}
.rightB{
width:50px;height:70px;font-size: 20px;color:#fff;background:rgba(0,0,0,0.5);position: absolute;right:0;top:45%;line-height:70px;text-align:center;cursor: pointer;display: none;
}
.leftB{
width:50px;height:70px;font-size: 20px;color:#fff;background:rgba(0,0,0,0.5);position: absolute;left:0;top:45%;line-height:70px;text-align:center;cursor: pointer;display: none;
}
.color1{background: #FFB12F;}
.color2{background: #00C378;}
.color3{background: #26B2E3;}
.color4{background: #E84C3D;}
.color5{background: #F831FD;}
</style>
<scriptsrc="http://www.lanrenzhijia.com/ajaxjs/jquery.min.js"></script>
<script>
$(function(){
var win=$(".win");
var links=$(".title a");
var float=$(".float");
var divs=$(".box div");
var num1=0; //当前内容的下标
var num2=0;
2017年10月13日 05点10分
1
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.win{
width:700px;height:300px;border:1px solid #ccc;margin:20pxauto;position:relative;
overflow: hidden;
}
.title{
width:100%;height:30px;background:#eee;position: relative;
}
.title a{
/*padding:0 30px;*/width:20%;height:100%;float:left;text-align:center;line-height: 30px;font-size: 15px;color:#009797;text-decoration:none;position: relative;z-index: 1;
}
.title .float{
width:20%;height:100%;background: #009797;position: absolute;
}
.box{
width:100%;height:270px;position: relative;
}
.box div{
width:100%;height: 100%;position: absolute;left:-100%;font-size:70px;text-align: center;line-height: 270px;top:0;color:#fff;
}
.rightB{
width:50px;height:70px;font-size: 20px;color:#fff;background:rgba(0,0,0,0.5);position: absolute;right:0;top:45%;line-height:70px;text-align:center;cursor: pointer;display: none;
}
.leftB{
width:50px;height:70px;font-size: 20px;color:#fff;background:rgba(0,0,0,0.5);position: absolute;left:0;top:45%;line-height:70px;text-align:center;cursor: pointer;display: none;
}
.color1{background: #FFB12F;}
.color2{background: #00C378;}
.color3{background: #26B2E3;}
.color4{background: #E84C3D;}
.color5{background: #F831FD;}
</style>
<scriptsrc="http://www.lanrenzhijia.com/ajaxjs/jquery.min.js"></script>
<script>
$(function(){
var win=$(".win");
var links=$(".title a");
var float=$(".float");
var divs=$(".box div");
var num1=0; //当前内容的下标
var num2=0;