鼠标滑过弹出层
来源:互联网 发布:淘宝与03年的非典 编辑:程序博客网 时间:2024/04/29 15:14
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>鼠标滑过弹出层</title>
<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script>
<style>
li{ list-style-type:none;}
.tc{ width:160px; height:400px; margin:50px auto; text-align:center;}
.tc li{ width:160px; margin:30px 0; height:40px; line-height:40px; font-size:40px; font-weight:bold; cursor:pointer;}
.tc-con{ width:400px; padding:20px; height:400px; background:#9FF; z-index:9;position: fixed; display:none;}
.tc-con .con{ height:360px;}
.tc-con .con p{ display:none;}
.tc-con .close{ height:20px; text-align:right;cursor:pointer;}
.tc-con .next{ width:200px; height:20px; text-align:right;cursor:pointer; float:left;}
.tc-con .prev{ width:200px; height:20px; text-align:left;cursor:pointer; float:left;}
.mark {width:100%;height:100%;float:left; background:#000; position: fixed;left:0;top:0;display:none; z-index:8; opacity:0.6;filter:alpha(opacity=60);}
</style>
<script>
$(document).ready(function(){
//弹出
$(".tc li").mouseover(function(){
//$(".tc-con").fadeIn(400);
$(".tc-con").slideDown(400);
var index=$(this).index();
$(".mark").show();
$(".tc-con p").eq(index).show();
$(".tc-con").show().css({"top":"150px","left":($(window).width()-$(".tc-con").width())*0.5 });
});
//下一个
$(".tc-con .next").click(function(){
var p=$(".tc-con p");
var len=p.length;
for(var i=0; i<len; i++){
if (p.eq(i).css("display") == "block" && i==len-1)
{
p.eq(0).show().siblings().hide();
break;
}else if(p.eq(i).css("display") == "block")
{
p.eq(i+1).show().siblings().hide();
break;
}
}
});
//上一个
$(".tc-con .prev").click(function(){
var p=$(".tc-con p");
var len=p.length;
for(var i=0; i<len; i++){
if (p.eq(i).css("display") == "block" && i==0)
{
p.eq(len-1).show().siblings().hide();
break;
}else if(p.eq(i).css("display") == "block")
{
p.eq(i-1).show().siblings().hide();
break;
}
}
});
//关闭
$(".close").click(function(){
$(".mark").hide();
$(".tc-con").hide();
$(".tc-con p").hide();
});
});
</script>
</head>
<body>
<ul class="tc">
<li>弹出层1</li>
<li>弹出层2</li>
<li>弹出层3</li>
<li>弹出层4</li>
</ul>
<div class="tc-con">
<div class="prev"> 上一个</div>
<div class="next">下一个 </div>
<div style="clear:both;"></div>
<div class="con">
<p>11111111111弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹1</p>
<p>2222222222222弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹2</p>
<p>333333333弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹3</p>
<p>44444444444444弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹出层内容弹4</p>
</div>
<div class="close">关闭 </div>
</div>
</div>
<div class="mark"></div>
</body>
</html>
- 鼠标滑过弹出层
- 鼠标滑过弹出层
- 纯css鼠标滑过弹出层
- css鼠标滑过弹出层客服
- js鼠标滑过弹出层的定位bug解决办法
- jquery鼠标滑过图片弹出
- 鼠标滑过显示隐藏层(转)
- jQuery鼠标滑过展示层效果
- 鼠标悬停弹出层
- 鼠标悬停弹出层
- 鼠标经过弹出层
- 鼠标点击弹出层
- 点击鼠标弹出层
- 自定义弹出框 鼠标滑过按钮有特效
- 鼠标滑过,实现下拉菜单弹出的示例代码
- ext 实现一个鼠标滑过弹出 子菜单面板
- GridView鼠标悬停弹出层
- GridView鼠标悬停/弹出层
- Java实现的文件切割器和文件合并器代码
- 在ubuntu上建立一个nginx代理邮件服务器20150405
- Objective-C学习-KVC(键值编码)和KVO(键值观察)
- 6 Easy Steps to Learn Naive Bayes Algorithm (with code in Python)
- mysql:Can’t create TCP/IP socket (10106)”
- 鼠标滑过弹出层
- Play Framework介绍:使用Eclipse开发和调试
- 各种类型占用字节数,以及内存分块20150908
- 爬取GEEKPARK最近一年活跃会员
- MySQL 性能调优的10个方法
- git设置HTTP代理
- C++优先级20150909
- 排序算法之选择排序
- Linux常用SIG信号及其键值