轮播图
来源:互联网 发布:手机淘宝 平板 编辑:程序博客网 时间:2024/06/01 19:45
<meta charset="utf8">
<style>
img{height: 400px;width: 260px}
span{color: #000;font-size: 50px}
</style>
<center>
<img src="" alt="一">
<img src="" alt="二" hidden>
<img src="" alt="三" hidden>
<img src="" alt="四" hidden>
<img src="" alt="五" hidden>
<br>
<span style="color: blue">1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>5</span>
</center>
<!-- <script src='jquery-1.8.3.js'></script> -->
<script src="jquery-1.8.2.min.js"></script>
<script>
$(function() {
aoto()
$('img').mouseover(function() {
clearInterval(start)
})
$('img').mouseout(function() {
aoto()
})
i=0
function aoto() {
start = setInterval(function() {
if($("img").eq(i).is(':visible')){
$("img").eq(i).hide()
$("span").eq(i).css('color','#000')
i++
i>4?$("img").eq(0).show():$("img").eq(i).show()
i = i>4?0:i
$("span").eq(i).css('color','blue')
}
},1000)
}
})
</script>
<style>
img{height: 400px;width: 260px}
span{color: #000;font-size: 50px}
</style>
<center>
<img src="" alt="一">
<img src="" alt="二" hidden>
<img src="" alt="三" hidden>
<img src="" alt="四" hidden>
<img src="" alt="五" hidden>
<br>
<span style="color: blue">1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>5</span>
</center>
<!-- <script src='jquery-1.8.3.js'></script> -->
<script src="jquery-1.8.2.min.js"></script>
<script>
$(function() {
aoto()
$('img').mouseover(function() {
clearInterval(start)
})
$('img').mouseout(function() {
aoto()
})
i=0
function aoto() {
start = setInterval(function() {
if($("img").eq(i).is(':visible')){
$("img").eq(i).hide()
$("span").eq(i).css('color','#000')
i++
i>4?$("img").eq(0).show():$("img").eq(i).show()
i = i>4?0:i
$("span").eq(i).css('color','blue')
}
},1000)
}
})
</script>
阅读全文
0 0
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 轮播图
- 唯快不破:深刻理解Python中的元类(metaclass)
- Gartner发布2018人工智能预测,五大未来愿景显示AI发展前景
- 关系型数据库工作原理-SQL解析(翻译自Coding-Geek文章)
- Java Mail 介绍及使用
- 外观模式
- 轮播图
- 第十三周——Java集合框架
- 查看 linux 版本信息
- zookeeper部署安装
- 【知识整理】Node.js-Koa之错误处理
- Jfinal---JFinalConfig解析
- selector 以及导航栏
- Android读写SD卡
- 11. Eclipse的概述和常见类