<a href="#" id="one1" onmouseover="setTab('one',1,2)" class="hover">专家汇聚</a>
<a href="#" id="one2" onmouseover="setTab('one',2,2)" >主治医师</a> <div id="con_one_1" >
<a href="#" target="_blank" class="sub2_more">更多</a>
<div class="sub2_con1"> 00 </div>
</div>
<div id="con_one_2" style="display:none">
<a href="#" target="_blank" class="sub2_more">更多</a>
<div class="sub2_con1">
555 </div> </div>
//tab切换
function setTab(name, cursel, n) {
for (i = 1; i <= n; i++) {
var menu = document.getElementById(name + i);
var con = document.getElementById("con_" + name + "_" + i);
menu.className = i == cursel ? "hover" : "";
con.style.display = i == cursel ? "block" : "none"; }
}
.sub2_more
{
display:block;
float:right;
text-align:center;
position:relative;
color:#00968b;
margin-top:-48px;
text-decoration:none;
font-size:12px;
margin-right:20px;
} .sub2_more:hover{color:#00c1b3}

解释:setTab('one',1,2) 与IDcon_one_2相关联,参数中的2表示总的滑动门总数

---------------------------------------------------------------------------------

结构:注意ID

<div class="FZ_Tab_Title txt_C">
<a href="" class="hover">仿真恐龙</a><a href="">仿真骨架</a><a href="">互动娱乐</a><a href="">机械怪兽</a>
</div>
<div class="Marquee"  >
<div class="Marquee_1" id="Marquee_1">
<ul id="Marquee_1_ul">
<li> <a href="" target="_blank"><img src="../images/03.jpg" width=286px height=215/><span>恐龙霸王龙11</span></a></li>
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙11</span></a></li>
<li> <a href="" target="_blank"><img src="../images/03.jpg" width=286px height=215/><span>恐龙霸王龙</span></a></li>
<li> <a href="" target="_blank"><img src="../images/03.jpg" width=286px height=215/><span>恐龙霸王龙</span></a></li> </ul>
</div> <div class="Marquee_2" id="Marquee_2">
<ul id="Marquee_2_ul">
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙22</span></a></li>
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙22</span></a></li>
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙</span></a></li>
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙</span></a></li>
</ul>
</div> <div class="Marquee_3" id="Marquee_3">
<ul id="Marquee_3_ul">
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙33</span></a></li>
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙33</span></a></li>
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙</span></a></li>
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙</span></a></li>
</ul>
</div> <div class="Marquee_4" id="Marquee_4">
<ul id="Marquee_4_ul">
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙44</span></a></li>
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙44</span></a></li>
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙</span></a></li>
<li> <a href="" target="_blank"><img src="../images/04.jpg" width=286px height=215/><span>恐龙霸王龙</span></a></li> </ul>
</div>
</div>
<script>
//切换的关键代码
$(".FZ_Tab_Title a").eq(0).addClass("hover");
$(".Marquee div").eq(0).show();
$(".FZ_Tab_Title a").hover(function () {
$(this).addClass("hover").siblings("a").removeClass("hover");
$(".Marquee div:eq(" + $(this).index() + ")").show().siblings("div").hide();
});
  new Marquee(["Marquee_1", "Marquee_1_ul"], 2, 2, "100%", 396, 50, -1, 0);//无缝滚动
new Marquee(["Marquee_2", "Marquee_2_ul"], 2, 2, "100%", 396, 50, -1, 0);//无缝滚动
new Marquee(["Marquee_3", "Marquee_3_ul"], 2, 2, "100%", 396, 50, -1, 0);//无缝滚动
new Marquee(["Marquee_4", "Marquee_4_ul"], 2, 2, "100%", 396, 50, -1, 0);//无缝滚动
/*样式代码用于滚动,不用于切换*/
.Marquee{padding-top:60px;height:250px;overflow:hidden}
.Marquee ul li ,.Marquee ul li div{ float:left;line-height:25px;overflow:hidden}
.Marquee ul li { float:left;line-height:25px;height:250px; width:300px; overflow:hidden}
.Marquee ul li a img{ width:286px; height:215px; display:inline-block}
.Marquee ul li a span{ display:inline-block;text-align:center;width:286px;color:#fff}
.Marquee ul li a:hover span{color:#da000f}
.Marquee ul li a:hover img{border:1px solid #5b2900}

最新文章

  1. 使用gulp+browser-sync搭建前端项目自动化以及自动刷新
  2. 设计模式之美:Command(命令)
  3. ip地址的组成(网络位+主机位)
  4. linux下常用文件传输命令 (转)
  5. Mysql性能优化之缓存参数优化
  6. HDU 2485 Destroying the bus stations (IDA*+ BFS)
  7. pointer-events属性
  8. Tomcat架构以及理解sever.xml
  9. FAQ: Python中if __name__ == &#39;__main__&#39;:作用
  10. ** poj Y2K Accounting Bug 2586
  11. .net下将富文本编辑器文本原样读入word文档
  12. 【Python之路】第一篇--Linux基础命令
  13. 部署LNMP架构Blog博客平台 ---惟净
  14. SSM框架开发web项目系列(五) Spring集成MyBatis
  15. 关于在Idea 创建Maven项目时,无法在source文件下创建servlet文件问题解决!
  16. Centos7通过SSH使用密钥实现免密登录
  17. .babelrc和babel.config.js的相同配置不能合并
  18. CCF-CIDR合并-201812-3
  19. phpmyadmin在nginx环境下配置错误
  20. 设置这个属性,progress就可以变成和背景一起的了

热门文章

  1. C++ 排序函数 sort(),qsort()的使用方法
  2. UNIX标准化及实现之限制
  3. 自动监控主从MySQL同步的SHELL脚本
  4. Asp.Net 之 网页快照
  5. java.lang.ClassNotFoundException: com.servlet.HandlesearchclassesServlet
  6. linux 基本命令 [转]
  7. Adobe Edge Animate --使用HTML5实现手机摇一摇功能
  8. 运用CMD命令关于快速获取文件夹名称和快速建立文件夹
  9. css cursor url用法格式详解
  10. less-3-混合