博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
tab切换
阅读量:7055 次
发布时间:2019-06-28

本文共 2451 字,大约阅读时间需要 8 分钟。

我此处的Tab切换,标题和内容没有直接关系,还是比较方便的

html

复制代码

css

ul{width:570px;height:40px; background:url(../imags/yicheng_bg.png) no-repeat;} ul li{ float:left;width:125px;height:40px; line-height:40px;} ul li a{ display:block; font-size:16px; width:123px;height:35px;font-weight:bold; text-align:center;color:#4B4848;}.occure{background: url(../imags/yicheng_bg2.png) no-repeat;display:block;}.yicheng{width:570px;height:220px; }.yicheng li{width:570px;height:220px; display:none;}.news{width:550px;height:200x; padding:5px 10px;}.news dl dd{height:35px; line-height:35px;background: url(../imags/point.png) no-repeat 7px 14px; padding-left:20px; }.news dl dd a{ display:block; font-size:14px; color:#717171; float:left; }.news dl dd a:hover{color:#0F7671; text-decoration:underline;}.news dl dd span{ display:block; font-size:14px; color:#717171; float:right; padding-right:20px; }复制代码

js

$(function(){		Tabchange(' .top', '.down', 'occure');	})function Tabchange( topname, downname, classname){	$(topname).children().mouseover(function(){		var index=$(this).index();		$(".nav_down").css('display','block');		$(downname).children(":eq("+index+")").show().siblings().hide();		$(this).addClass(classname).siblings().removeClass(classname);				//alert(1);	})	}复制代码

是不是很简单呢?

其实这是很久之前写的了,懒得整理,今天整理下分享给大家,有疑问的问我哦!

转载于:https://juejin.im/post/5c1789056fb9a049fc0370eb

你可能感兴趣的文章
cc笔记_web测试方法总结
查看>>
Exchange企业实战技巧(18)日志规则应用之审计邮箱
查看>>
sharepoint 2010 同步问题
查看>>
iftop流量监控使用
查看>>
自动化运维工具(四)之 (虚拟主机)
查看>>
Linux分区
查看>>
Slider Revolution实现幻灯片
查看>>
bootstrap提供了六种列表效果
查看>>
解决RPM包依赖的几种方法
查看>>
LAMP+LogAnalyzer日志服务器环境搭建
查看>>
访问控制列表(ACL)的应用实例
查看>>
split、replace、indexof、substr 用法 (获取后台富文本框内容,截取图片)
查看>>
怎样在 ubuntu 上安装 Linux 3.11 内核
查看>>
struts2配置
查看>>
bzoj 1067: [SCOI2007]降雨量
查看>>
我的友情链接
查看>>
ArcGIS 基础1-打开地图文档并浏览
查看>>
我的友情链接
查看>>
php 字符串分割函数split
查看>>
Bex5自动编号相关函数和用法
查看>>