本文实例讲述了jQuery实现MSN中文网滑动Tab菜单效果代码。分享给大家供大家参考。具体如下:

这是一款jQuery实现Msn中文网的滑动滑动门代码,利用jQuery实现的效果,代码很巧妙,就是利用一个绝对定位的层来实现移动效果,但是体验度大幅提升了。

运行效果截图如下:

jQuery实现MSN中文网滑动Tab菜单效果代码

在线演示地址如下:

http://demo.jb51.net/js/2015/jquery-f-msn-tab-menu-style-codes/

具体代码如下:

<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312" />
<meta http-equiv="Refresh" content="3600" />
<title>MSN中文网:时尚生活 白领门户</title>
<style>
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{
 margin: 0;
 padding: 0;
}
ol,ul{
 list-style: none;
}
.clearfix:after{
 content: ".";
 display: block;
 height: 0;
 clear: both;
 visibility: hidden;
}
.clearfix{
 display: inline-block;
}
/* Hides from IE-mac \*/
* html .clearfix{
 height: 1%;
}
.clearfix{
 display: block;
}
/* End hide from IE-mac */
body{
 font-size: 12px;
 font-family: "Microsoft Yahei" ,Tahoma, "SimSun";
 color: #333;
 background: #fff;
 line-height: 1.5;
}
.main_l{
 width: 513px;
 position: relative;
 float: left;
}
.main_title{
 height: 28px;
 overflow: hidden;
 background: url(images/s3.png) 0 0 no-repeat;
 float: left;
}
.main_title ul{
 font-size: 14px;
}
.main_title ul li{
 height: 23px;
 line-height: 23px;
 padding-left: 16px;
 padding-right: 16px;
 padding-top: 1px;
 background: #f1f1f1;
 border-top: #fff 3px solid;
 border-left: #fff 1px solid;
 border-right: #fff 1px solid;
 float: left;
}
.main_title ul .on{
 height: 22px;
 line-height: 22px;
 padding-left: 16px;
 padding-right: 16px;
 background: #fff;
 border-top: #009ad9 4px solid;
 border-left: #009ad9 1px solid;
 border-right: #009ad9 1px solid;
 border-bottom: #fff 1px solid;
}
.main_title ul .on a{
 font-weight: 700;
}
.main_title span{
 line-height: 24px;
 padding-top: 4px;
 padding-right: 10px;
 float: right;
}
.main_l .main_title{
 width: 513px;
 overflow: hidden;
}
.main_l .main_content{
 width: 513px;
}
.main_l .main_content .main_box{
 width: 339px;
 overflow: hidden;
 float: left;
}
.main_l .main_content .main_box .list{
 font-size: 14px;
 line-height: 26px;
}
.main_l .main_content .main_box .list ul{
 padding: 8px 0;
 border-bottom: #e1e1e1 1px solid;
 width: 339px;
 overflow: hidden;
}
.main_l .main_content .main_box .list ul li{
 padding-left: 25px;
 background: url(images/s3.png) 3px -300px no-repeat;
 width: 600px;
}
.main_l .main_content .main_box .list ul .v{
 background: url(images/s3.png) 3px -330px no-repeat;
}
.main_l .main_content .main_box .list ul .top{
 background: none;
 padding-left: 0;
 text-align: center;
 font-size: 14px;
 font-weight: 700;
 width: 339px;
}
.tab div.t.none{
 display: none;
}
.tab .main_title ul.fx li{
 background-color: transparent;
}
.tab .main_title ul.fx li, .tab .main_title ul.fx li.on{
 border-top: 0;
 margin-top: 3px;
 padding-top: 0;
}
.tab .main_title ul.fx li.on{
 border-left-color: transparent;
 border-right-color: transparent;
 border-bottom-width: 0;
}
.tab .main_title ul.fx{
 z-index: 20;
 position: relative;
}
.tab .main_title div.animate{
 height: 23px;
 position: absolute;
 top: 0;
 border-top: #009ad9 4px solid;
 border-left: #009ad9 1px solid;
 border-right: #009ad9 1px solid;
 border-bottom: #fff 1px solid;
 background-color: #fff;
}
</style>
<script src="/UploadFiles/2021-04-02/jquery-1.6.2.min.js">

希望本文所述对大家的jQuery程序设计有所帮助。

风云阁资源网 Design By www.bgabc.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
风云阁资源网 Design By www.bgabc.com

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。

更新日志