jquery实现带背景轮播轮换的顶部二级菜单固定导航效果代码
代码语言:html
所属分类:图片放大
代码描述:jquery+SuperSlide实现带背景轮播轮换大图的顶部二级菜单固定导航效果代码,滚动一下菜单会滚动在顶部。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html> <head> <meta charset="UTF-8"> <style> html,body { color: #333; margin: 0; height: 100%; font-family: "Myriad Set Pro","Helvetica Neue",Helvetica,Arial,Verdana,sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-weight: normal; } * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } a { text-decoration: none; color: #000; } img { border: 0; } body { background: #fff; color: #666; } html, body, div, dl, dt, dd, ol, ul, li, h1, h2, h3, h4, h5, h6, p, blockquote, pre, button, fieldset, form, input, legend, textarea, th, td { margin: 0; padding: 0; } a { text-decoration: none; color: #08acee; } button { outline: 0; } img { border: 0; } button,input,optgroup,select,textarea { margin: 0; font: inherit; color: inherit; outline: none; } li { list-style: none; } a { color: #666; } a:hover { color: #eee; } .clearfix::after { clear: both; content: "."; display: block; height: 0; visibility: hidden; } .clearfix { } /* 必要布局样式css */ .aui-header-top { position: fixed; top: 0; width: 100%; z-index: 1; background-color: rgba(0,0,0,0.3); background-color: #000; transition: all 0.6s ease-out; } .aui-header-title { width: 1200px; margin: 0 auto; } .aui-header-title .aui-title { float: left; margin-left: 10px; } .aui-header-title a { font-size: 12px; color: #fff; opacity: 0.4; line-height: 28px; } .aui-header-title .navList { float: right; margin-right: 10px; } .aui-header-title .navList li:first-child { margin-left: 0; } .aui-header-title .navList li { float: left; margin-left: 66px; } .aui-header-title a { font-size: 12px; color: #fff; opacity: 0.4; line-height: 28px; } .aui-header-title .navList li a { font-size: 12px; } .aui-header-nav { position: fixed; top: 0; width: 100%; background-color: transparent; border-bottom: 1px solid transparent; z-index: 999; transition: all 0.45s ease-in-out; } .aui-header-nav.moveDown { top: 29px; transition: all 0.45s ease-in-out; } .aui-header-nav .wrapper { position: relative; width: 1180px; /* padding: 0 10px; */ height: 60px; margin: 0 auto; } .aui-header-nav .aui-logo { width: 130px; height: 35px; margin-left:10px; background: url(//repo.bfw.wiki/bfwrepo/icon/60b2c443baaca.png) no-repeat; background-size: 80px auto; } .aui-header-nav .wrapper .aui-logo { position: relative; top: 19px; } .aui-header-nav.solid .aui-logo { background: url(//repo.bfw.wiki/bfwrepo/icon/60ecf359eb0c5.png) no-repeat; background-size: 80px auto; } .aui-header-nav .aui-logo h1 { text-indent: -99999px; } .aui-header-nav .wrapper .aui-top-nav { position: absolute; right: 200px; top: 0; } .aui-top-nav .menu { -webkit-user-select: none; user-select: none; margin-top: 4px; } .aui-top-nav .menu >li { float: left; margin-left: 20px; height: 55px; } .aui-top-nav .menu >li >a { display: inline-block; vertical-align: baseline; zoom: 1; padding: 0 10px; height: 55px; font-size: 16px; line-height: 55px; color: #fff; border-bottom: 2px solid transparent; border-bottom: 0 ; background-color: rgba(0,0,0,0); } .aui-header-nav.solid .aui-top-nav .menu >li >a { color: #383838; } .aui-top-nav .menu >li .panel { position: fixed; top: 88px; left: 0; right: 0; height: 120px; padding-top: 0; filter: alpha(opacity = 0) ; opacity: 0; transition-delay: 0.1s; transition-duration: 0.3s; z-index: -1; visibility: hidden; visibility: visible; display: none; background-color: #fff; text-align: center; border-bottom: 1px solid #e4e4e4; } .aui-top-nav .menu >li .panel.product { height: auto; } .aui-top-nav .menu >li .panel .inner { display: inline-block; vertical-align: baseline; zoom: 1; width: 1180px; padding: 28px 0 37px 0; box-shadow: none; overflow: hidden; text-align: center; } .aui-top-nav .menu >li .panel .list { display: inline-block; vertical-align: baseline; zoom: 1; /* float: left; */ } .aui-top-nav .menu >li .panel.product .list { box-sizing: border-box; display: block; height: 60px; text-align: left; margin-left: 295px; margin-top: 30px; } .aui-top-nav .menu >li .panel.product .list dt { display: inline-block; vertical-align: baseline; zoom: 1; width: 90px; vertical-align: middle; font-size: 16px; color: #373d40; line-height: 60px; margin-right: -20px; } .aui-header-nav.solid .aui-top-nav .menu >li .panel .list dt { color: #7d8496; } .aui-top-nav .menu >li .panel .list dd { display: inline-block; vertical-align: baseline; zoom: 1; margin-left: 80px; text-align: center; vertical-align: top; } .aui-top-nav .menu >li .panel .list a { display: block; font-size: 14px; line-height: 1.5; color: #383838; font-weight: 400; text-align: center; } .aui-header-nav.solid .aui-top-nav .menu >li .panel .list a { color: #383838; } .aui-top-nav .u-iconfont { font-size: 32px; line-height: 33px; color: #383838; } .aui-top-nav .menu >li .panel .list dd em { font-weight: 400; } .aui-top-nav .menu >li .panel .list dd .txt { display: block; margin-top: 8px; font-style: normal; } a, a:hover { color: #488bff; } .aui-header-top.moveUp { top: -29px; transition: all 0.5s ease-out; } .aui-header-nav.solid { background-color: #fff; background-color: #fff; border-bottom: 1px solid #f0f1f2; transition: all 0.5s ease-in-out; } .aui-header-nav .wrapper .m-login { position: absolute; right: 10px; top: 16px; } .u-btn { display: inline-block; vertical-align: baseline; zoom: 1; padding: 7px 15px; background-color: #49a0f5; border: 1px solid #49a0f5; border-radius: 2px; font-size: 14px; line-height: 1; color: #fff; cursor: pointer; } .m-login .u-btn { display: inline-block; vertical-align: baseline; zoom: 1; padding: 7px 15px; font-size: 14px; border-radius: 2px; letter-spacing: 0; line-height: 1.2; vertical-align: top; } .m-login .sign { transition: all 0.4s ease-out; } .u-btn.sign { padding: 7px 15px; background-color: transparent; border: 1px solid #e5e5e5; color: #e5e5e5; } .m-login .u-btn.sign { margin-right: 12px; } .aui-header-nav.solid .m-login .u-btn { transition: all 0.4s ease-out; } .aui-header-nav.solid .m-login .sign { background-color: transparent; border: 1px solid #505050; color: #383838; transition: all 0.4s ease-out; } .aui-header-nav.solid .m-login .free { background-color: #49a0f5; border: 1px solid #49a0f5; color: #fff; transition: all 0.4s ease-out; } .m-login .u-btn { display: inline-block; vertical-align: baseline; zoom: 1; padding: 7px 15px; font-size: 14px; border-radius: 2px; letter-spacing: 0; line-height: 1.2; vertical-align: top; } .u-btn.free { padding: 7px 15px; background-color: #fff; border: 1px solid #fff; color: #383838; } .m-login .u-btn.free { margin-left: 0; } .aui-header-nav.solid .m-login .u-btn { transition: all 0.4s ease-out; } .aui-header-nav.moveDown { top: 29px; transition: all 0.45s ease-in-out; } .aui-top-nav .menu >li:hover .panel { filter: alpha(opacity = 100) ; opacity: 1; transition-delay: 0.1s; transition-duration: 0.3s; z-index: 1; visibility: visible; display: block; } .aui-top-nav .menu >li >a:hover { color: #3b8fea; border-color: #3b8fea; border-bottom: 2px solid #3B8FEA; } .aui-top-nav .menu >li .panel .list dd .txt:hover { color: #3b8fea; } .icon-font { width: 30px; height: 30px; background-size: 30px; display: block; margin: 0 auto; } .icon-font-item001 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon001.png") no-repeat; background-size: 30px; } .icon-font-item002 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon002.png") no-repeat; background-size: 30px; } .icon-font-item003 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon003.png") no-repeat; background-size: 30px; } .icon-font-item004 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon004.png") no-repeat; background-size: 30px; } .icon-font-item005 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon005.png") no-repeat; background-size: 30px; } .icon-font-item006 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon006.png") no-repeat; background-size: 30px; } .icon-font-item007 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon007.png") no-repeat; background-size: 30px; } .aui-top-nav .menu >li .panel .list a:hover .icon-font { width: 30px; height: 30px; background-size: 30px; display: block; margin: 0 auto; } .aui-top-nav .menu >li .panel .list a:hover .icon-font-item001 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon001-1.png") no-repeat; background-size: 30px; } .aui-top-nav .menu >li .panel .list a:hover .icon-font-item002 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon002-2.png") no-repeat; background-size: 30px; } .aui-top-nav .menu >li .panel .list a:hover .icon-font-item003 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon003-3.png") no-repeat; background-size: 30px; } .aui-top-nav .menu >li .panel .list a:hover .icon-font-item004 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon004-4.png") no-repeat; background-size: 30px; } .aui-top-nav .menu >li .panel .list a:hover .icon-font-item005 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon005-5.png") no-repeat; background-size: 30px; } .aui-top-nav .menu >li .panel .list a:hover .icon-font-item006 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon006-6.png") no-repeat; background-size: 30px; } .aui-top-nav .menu >li .panel .list a:hover .icon-font-item007 { background: url("//repo.bfw.wiki/bfwrepo/images/banner/icon007-7.png") no-repeat; background-size: 30px; } .aui-top-nav .menu >li .panel .list a:hover .txt { color: #3b8fea; } .solid .aui-top-nav .menu >li .panel { top: 61px; } .aui-banner-slide { position: relative; min-width: 1000px; background-color: #081238; } .aui-banner-main { position: relative; width: 100%; overflow: hidden; text-align: center; user-select: none; -webkit-user-select: none; height: 580px; } .aui-banner-wrapper { position: relative; -webkit-transition-property: -webkit-transform, left, top; -webkit-transition-duration: 0s; -webkit-transform: translate3d(0px,0,0); -webkit-transition-timing-function: ease; -moz-transition-property: -moz-transform, left, top; -moz-transition-duration: 0s; -moz-transform: translate3d(0px,0,0); -moz-transition-timing-function: ease; -o-transition-property: -o-transform, left, top; -o-transition-duration: 0s; -o-transform: translate3d(0px,0,0); -o-transition-timing-function: ease; -o-transform: translate(0px,0px); -ms-transition-property: -ms-transform, left, top; -ms-transition-duration: 0s; -ms-transform: translate3d(0px,0,0); -ms-transition-timing-function: ease; transition-property: transform, left, top; transition-duration: 0s; transform: translate3d(0px,0,0); transition-timing-function: ease; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; } .aui-banner-button { z-index: 1002; margin-top: 15px; position: absolute; top: 59%; left: 12%; } .aui-banner-button a { padding: 11px 43px; border-width: 1px; border-style: solid; border-color: #fff; border-radius: 2px; background-color: #fff; font-size: 14px; line-height: 1.3; color: #383838; color: #fff; background-color: #488bff; border-color: #488bff; display: inline-block; vertical-align: baseline; zoom: 1; border: 1px solid #49a0f5; } .aui-banner-button a:hover { color: #fff; border-color: #3981ff; background-color: #3981ff; } .aui-banner-button .aui-btn-wh { color: #fff; background-color: rgba(255,255,255,0); margin-left: 20px; padding: 11px 43px; border-width: 1px; border-style: solid; border-color: #fff; border-radius: 2px; font-size: 14px; line-height: 1.3; color: #fff; } .aui-banner-button .aui-btn-wh:hover { color: #fff; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0