在jQuery之焦点图转换-左右的基础上,将jQuery代码改成js原生,并添加定时器(setInterval()和clearInterval())
焦点图转换--原生和定时器 .pic-show{width: 480px;overflow: hidden;} #pic{width: 1920px;height: 320px;position: relative;} #pic img{display: block;float: left;} .pic-show>img{display: block;cursor: pointer;opacity: 0.8; position: absolute;top: 142px;left: 30px;} .pic-show>img:last-child{display: block; position: absolute;left: 414px; } ul{width: 120px;height: 18px;position: absolute;top: 280px;left: 185px;} li{float: left;width: 20px;height: 18px;margin-left: 5px;} a{display: block;width: 20px;height: 18px;text-decoration: none;border: 1px solid #ccc;border-radius: 50%;background-color: #ccc;opacity: 0.6;} a:hover{background-color: #094a99;} .aCss{background-color: #094a99;} p{width: 480px;text-align: center;}
这是一段测试文字


