Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
First section
Second section
Third section
Fourth section
Fifth section
First section
Second section
Third section
Fourth section
Fifth section
css
* { box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; background-color: #ededed; color: slategrey; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; } a { text-decoration: none; } h1 { font-family: 'Bree Serif', serif; margin-top: 0px; margin-bottom: 0px; letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); text-align: center; } .wrapper { max-width: 800px; margin: 0 auto; } ul { list-style-type: none; padding-left: 0px; } nav { position: relative; } nav ul { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; width: 100%; } nav ul li { width: 20%; text-align: center; } nav ul li a { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; color: slategrey; -webkit-transition: all .15s ease; transition: all .15s ease; } nav ul li a:hover { color: #434d57; -webkit-transition: all .15s ease; transition: all .15s ease; } nav ul li a.selected { -webkit-transition: all .15s ease; transition: all .15s ease; color: white; } #navActiveBG { position: absolute; top: 14px; width: 20%; height: 24px; background: slategrey; border-radius: 4px; -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.7, -0.2, 0.2, 1.5); transition: -webkit-transform 0.5s cubic-bezier(0.7, -0.2, 0.2, 1.5); transition: transform 0.5s cubic-bezier(0.7, -0.2, 0.2, 1.5); transition: transform 0.5s cubic-bezier(0.7, -0.2, 0.2, 1.5), -webkit-transform 0.5s cubic-bezier(0.7, -0.2, 0.2, 1.5); will-change: transform; z-index: -1; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08); } .content { margin-top: 2rem; position: relative; } .content .section { -webkit-animation: contentSwitch .5s forwards; /* Safari 4+ */ /* Fx 5+ */ /* Opera 12+ */ animation: contentSwitch .5s forwards; /* IE 10+, Fx 29+ */ display: none; background-color: white; padding: 30px; border-radius: 4px; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08); color: white; } .content .section:nth-child(1) { display: block; background: #f857a6; /* fallback for old browsers */ background: -webkit-linear-gradient(45deg, #ff5858, #f857a6); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(45deg, #ff5858, #f857a6); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } .content .section:nth-child(2) { background: #de6262; /* fallback for old browsers */ background: -webkit-linear-gradient(45deg, #de6262, #ffb88c); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(45deg, #de6262, #ffb88c); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } .content .section:nth-child(3) { background: #5f2c82; /* fallback for old browsers */ background: -webkit-linear-gradient(45deg, #49a09d, #5f2c82); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(45deg, #49a09d, #5f2c82); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } .content .section:nth-child(4) { background: #7474BF; /* fallback for old browsers */ background: -webkit-linear-gradient(45deg, #348AC7, #7474BF); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(45deg, #348AC7, #7474BF); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } .content .section:nth-child(5) { background: #283048; /* fallback for old browsers */ background: -webkit-linear-gradient(45deg, #859398, #283048); /* Chrome 10-25, Safari 5.1-6 */ background: linear-gradient(45deg, #859398, #283048); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } @-webkit-keyframes contentSwitch { 0% { opacity: 0; } 10% { opacity: 0; -webkit-filter: blur(15px); -moz-filter: blur(15px); -o-filter: blur(15px); -ms-filter: blur(15px); filter: blur(15px); } 100% { opacity: 1; } }
JavaScript
function toggleVisibility(newSection) { $(".section").not("#" + newSection).hide(); $("#" + newSection).show(); } var $links = $('a'); $links.click(function(){ $links.removeClass('selected'); $(this).addClass('selected'); var identify= $(this).attr("data-identify"); if ( identify == 1 ) { $('#navActiveBG').css ('transform', 'translateX(0%)'); } if (identify == 2) { $('#navActiveBG').css ('transform', 'translateX(100%)') } if ( identify == 3) { $('#navActiveBG').css ('transform', 'translateX(200%)') } if ( identify == 4) { $('#navActiveBG').css ('transform', 'translateX(300%)') } if ( identify == 5) { $('#navActiveBG').css ('transform', 'translateX(400%)') } });
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>时髦的滑动导航-jq22.com</title> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <style>
</style> </head> <body>
<script>
</script>
</body> </html>
2012-2021 jQuery插件库版权所有
jquery插件
|
jq22工具库
|
网页技术
|
广告合作
|
在线反馈
|
版权声明
沪ICP备13043785号-1
浙公网安备 33041102000314号