1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > jQuery实现滚动切换的tab选项卡效果代码【jquery】

jQuery实现滚动切换的tab选项卡效果代码【jquery】

时间:2022-11-05 03:29:08

相关推荐

jQuery实现滚动切换的tab选项卡效果代码【jquery】

web前端|js教程

jQuery,滚动切换,tab,选项卡

web前端-js教程

本文实例讲述了jQuery实现滚动切换的tab选项卡效果代码。分享给大家供大家参考。具体如下:

java集合源码,vscode在电脑上怎么安装,ubuntu调整主题,tomcat中运行ajax,爬虫多图,常用php拓展,重庆地区关键词seo价格lzw

这里介绍的jquery tab选项卡滚动动态切换代码,似乎很个性的网页选项卡,没有边框的修饰,但十分简约大方,选项卡菜单目前在各大网站很流行,做为前端设计者,能够得心应手的写出一个选项卡是很有必要的哦,希望本代码能为您带去一份参考资料。

jsp仿新浪源码,手机怎么刷ubuntu,网页小说爬虫工具,php哪里好用,seo首页调取lzw

先来看看运行效果截图:

小程序新闻类源码,vscode 加载大型项目,ubuntu 解释器,帆软 tomcat sql,国外爬虫公司,php sn码,外贸公司seo推广方案,jsp导航网站源码,phpcms模板 新闻网lzw

在线演示地址如下:

/js//jquery-scroll-cha-tab-nav-style-codes/

具体代码如下:

jquery tab选项卡动态切换* { margin: 0; padding: 0;}body {font-family: helvetica, tahoma, Sans-serif; font-size: 13px; background: url(images/bgdemo1.jpg) repeat;}a { text-decoration: none;}h2 { font-family: Helvetica, tahoma, Sans-serif; font-size: 25px; font-weight: bold; text-shadow: 0 1px 1px white;}p { text-shadow: 0 1px 1px white;}#navbar { margin: 20px 0 0 40px; width: 650px; font-weight: bold;}ul li{ display: inline-block;}ul li a {float:left position: relative; display: block; width: 150px; text-align: center;}.active a{ padding: 28px 0 20px 0; background: -webkit-gradient(linear, left top, left bottom, from(#db0000), to(#9b0000)); background: -moz-linear-gradient(top center, #db0000, #9b0000); border: 1px solid #8d0000; text-shadow: 0 1px 1px black; -webkit-border-radius: 10px 10px 0 0; -webkit-background-clip: padding-box; -webkit-box-shadow: inset 0 0 1px #fd0000; -moz-border-radius: 10px 10px 0 0; -moz-background-clip: padding-box; -moz-box-shadow: inset 0 0 1px #fd0000; margin-left: -5px; z-index: 2; color: white; text-shadow: 0 1px 1px black;}.active a:focus { outline: none;}.inactive a:hover { background: -webkit-gradient(linear, left bottom, left top, from(#eee), to(#ddd)); background: -moz-linear-gradient(top center, #ddd, #eee);}.inactive a { color: #222; text-shadow: 0 1px 1px white; background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#ddd)); background: -moz-linear-gradient(top center, #eee, #ddd); -webkit-box-shadow: inset 0 0 5px white; -moz-box-shadow: inset 0 0 5px white; padding: 20px 0; -webkit-box-shadow: inset 0 0 5px white; -moz-box-shadow: inset 0 0 5px white; border: 1px solid #ccc; margin-left: -5px; z-index: 1;}.inactive a:focus { outline: none;}span.notification {; position: absolute; padding: 5px; margin-top: -6px; color: white; min-width: 15px; text-align: center; border: 1px solid #000; background: -webkit-gradient(linear, left top, left bottom, from(#2a2a2a), to(#222)); background: -moz-linear-gradient(top center, #2a2a2a, #222); -webkit-box-shadow: inset 0 0 1px #333; -moz-box-shadow: inset 0 0 1px #333; text-shadow: 0 -1px 1px black; -webkit-border-radius: 50px; -moz-border-radius: 50px; margin-left: 10px;}#slider { width: 555px; background: rgba(250,250,250,0.3); padding: 30px 25px 30px 25px; line-height: 25px; margin-left: 35px;}.back { font-weight: bold; padding: 20px 0 30px 0; line-height: 25px; margin-left: 35px;}.back a, .back a:visited{ padding: 0 0 3px 0; color: #000000; border-bottom: 1px solid #ffffff;}.back a:hover, .back a:visited:hover{ padding: 0 0 3px 0; color: #990000; border-bottom: 1px solid #000000;}.back a:active{ padding: 0 0 3px 0; color: #000000; border-bottom: 4px solid #000000;}$(document).ready(function(){ $(li).click(function(){ var number = $(this).index(); $(h2).slideUp(400).eq(number).slideDown(400); $(p).slideUp(400).eq(number).slideDown(400); $(li).removeClass(inactive).addClass(active); $(li).not(this).removeClass(active).addClass(inactive); }); $(h2).not(:first).hide(); $(p).not(:first).hide();});

Projects34 Contacts Earnings To-do100

Projects

Projects内容区

Contacts

Contacts内容区

Earnings

Earnings内容区

To-do

To-do内容区

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。