| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354 |
- /*前台通用头部*/
- /* 头部 */
- .fly-header{
- position: fixed;
- left: 0;
- top: 0;
- z-index: 10000;
- width: 100%;
- border-bottom: 1px solid #404553;
- border-right: 1px solid #404553;
- border-radius: 0;
- background-color:#2f363c;
- height: 60px;
- transition: height 0.3s ease;
- }
- .fly-header .layui-container {
- position: relative;
- height: 60px;
- }
- .fly-header .fly-head {
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 60px;
- width: 100%;
- }
- .fly-header .navbar-toggle {
- position: relative;
- padding: 18px 12px;
- cursor: pointer;
- background: transparent;
- border: none;
- outline: none;
- flex-shrink: 0;
- z-index: 1001;
- }
- .fly-header .navbar-toggle .icon-bar {
- display: block;
- height: 2px;
- border-radius: 1px;
- width: 20px;
- background-color: #888;
- transition: all 0.3s ease;
- }
- .fly-header .navbar-toggle .icon-bar + .icon-bar {
- margin-top: 4px;
- }
- .fly-header .navbar-toggle:hover .icon-bar {
- background-color: #fff;
- }
- .fly-header .fly-logo {
- float: left;
- flex-shrink: 0;
- }
- .fly-header .fly-logo h2 {
- font-size: 21px;
- line-height: 60px;
- color: #fff;
- font-weight: normal;
- margin: 0;
- white-space: nowrap;
- }
- /* 桌面端导航 */
- .fly-nav-desktop {
- display: block;
- }
- .fly-header .fly-nav-user .iconfont {
- position: relative;
- }
- .fly-header .fly-nav-avatar img {
- width: 36px;
- height: 36px;
- margin-right: 10px;
- border-radius: 100%;
- }
- .fly-header .fly-nav-user .layui-nav-child a i {
- position: relative;
- top: 1px;
- margin-right: 10px;
- }
- .fly-header .layui-nav {
- padding: 0;
- background: transparent;
- }
- .fly-header .fly-nav-user li a {
- padding: 0 10px;
- }
- .fly-header .fly-nav-user li .fly-nav-avatar {
- padding-right: 25px;
- }
- .fly-header .layui-nav .layui-this:after,
- .fly-header .layui-nav .layui-nav-bar {
- display: none !important;
- }
- .fly-header .layui-nav-right {
- float: right !important;
- }
- .fly-header .layui-nav .fly-nav-user {
- margin-left: 30px;
- }
- .fly-header .layui-nav .fly-nav-user .layui-btn-register,
- .fly-header .layui-nav .fly-nav-user .layui-btn-login {
- display: inline-block;
- color: #fff !important;
- }
- /* 导航图标样式 */
- .fly-header .layui-nav-item a i {
- margin-right: 5px;
- font-size: 16px;
- }
- .fly-header .layui-nav-item a .iconfont {
- vertical-align: middle;
- }
- /* 移动端导航图标 */
- @media screen and (max-width: 768px) {
- .fly-header .fly-nav-mobile .layui-nav-item a i {
- font-size: 18px;
- width: 24px;
- text-align: center;
- display: inline-block;
- }
- }
- /* 图标字体占位(如果 iconfont 未加载) */
- .icon-search:before { content: "🔍"; }
- .icon-language:before { content: "🌐"; }
- .icon-shop:before { content: "🛒"; }
- /*白色主题*/
- .light-theme .fly-header {
- border-color: #fff;
- box-shadow: 0 1px 8px rgb(0 0 0 / 8%);
- background: #fff;
- }
- .light-theme .fly-header .layui-nav .layui-nav-item a {
- color: #555;
- }
- .light-theme .fly-header .layui-nav {
- background-color: #fff;
- color: #555;
- }
- .light-theme .fly-header .navbar-toggle {
- color: #000;
- }
- .light-theme .fly-header .navbar-toggle .icon-bar {
- background-color: #333;
- }
- .light-theme .fly-header .fly-logo h2 {
- color: #333;
- }
- .light-theme .fly-header .layui-nav .layui-this>a {
- color: #1e9fff;
- }
- /* 移动端白色主题适配 */
- @media screen and (max-width: 768px) {
- .light-theme .fly-header .navbar-toggle .icon-bar {
- background-color: #333;
- }
- }
- /* 底部 */
- .fly-footer {margin: 50px 0 0;}
- .fly-footer .copyright{background: #393939;line-height: 50px;text-align: center; color: #aaa;}
- .fly-footer .copyright a{padding:0 6px; font-weight: 300; color: #aaa;}
- .fly-footer .copyright a:hover{color: #fff;}
- @media screen and (min-width: 768px) {
- .fly-header .fly-head {
- float: left;
- }
-
- .fly-header .navbar-toggle {
- display: none;
- }
-
- .fly-header .navbar-collapse.layui-hide {
- display: block !important;
- }
-
- .fly-nav-mobile {
- display: none !important;
- }
- }
- @media screen and (max-width: 768px) {
- /* 隐藏桌面端导航 */
- .fly-nav-desktop {
- display: none !important;
- }
-
- /* 头部固定高度,防止拉长 */
- .fly-header {
- height: 56px;
- }
-
- .fly-header .layui-container {
- height: 56px;
- }
-
- .fly-header .fly-logo h2 {
- font-size: 17px;
- line-height: 56px;
- }
-
- /* 移动端菜单容器 - 绝对定位,不影响头部高度 */
- .fly-header .navbar-collapse {
- position: absolute;
- top: 56px;
- left: 0;
- right: 0;
- background: #fff;
- box-shadow: 0 4px 12px rgba(0,0,0,0.15);
- max-height: 0;
- overflow: hidden;
- transition: max-height 0.3s ease-out;
- z-index: 999;
- margin: 0;
- padding: 0;
- }
-
- .fly-header .navbar-collapse.layui-hide {
- max-height: 0;
- }
-
- .fly-header .navbar-collapse:not(.layui-hide) {
- max-height: 500px;
- overflow-y: auto;
- -webkit-overflow-scrolling: touch;
- }
-
- /* 移动端导航样式 */
- .fly-header .fly-nav-mobile {
- width: 100%;
- background: #fff !important;
- }
-
- .fly-header .fly-nav-mobile .layui-nav-item {
- display: block;
- border-bottom: 1px solid #f0f0f0;
- }
-
- .fly-header .fly-nav-mobile .layui-nav-item a {
- padding: 14px 20px;
- height: auto;
- line-height: 1.4;
- color: #333;
- display: flex;
- align-items: center;
- }
-
- .fly-header .fly-nav-mobile .layui-nav-item a i {
- width: 24px;
- font-size: 18px;
- margin-right: 10px;
- text-align: center;
- }
-
- .fly-header .fly-nav-mobile .layui-nav-item.layui-this a {
- background-color: #f5f5f5;
- color: #1e9fff;
- }
-
- .fly-header .fly-nav-mobile .layui-nav-child {
- position: static;
- width: 100%;
- background: #fafafa;
- border-top: 1px solid #f0f0f0;
- border-radius: 0;
- box-shadow: none;
- }
-
- .fly-header .fly-nav-mobile .layui-nav-child dd a {
- padding-left: 54px;
- font-size: 14px;
- }
-
- /* 用户头像区域 */
- .fly-header .fly-nav-mobile .fly-nav-avatar {
- display: flex;
- align-items: center;
- padding: 14px 20px !important;
- }
-
- .fly-header .fly-nav-mobile .fly-nav-avatar img {
- width: 32px;
- height: 32px;
- margin-right: 10px;
- }
-
- .fly-header .fly-nav-mobile .fly-nav-avatar cite {
- font-style: normal;
- font-size: 14px;
- }
-
- .fly-header .fly-nav-mobile .fly-nav-user .layui-nav-child {
- background: #fafafa;
- }
-
- .fly-header .fly-nav-mobile .fly-nav-user .layui-nav-child dd a {
- padding-left: 54px;
- }
-
- /* 汉堡菜单按钮 */
- .fly-header .navbar-toggle {
- padding: 16px 10px;
- margin: 0;
- background: transparent;
- }
-
- .fly-header .navbar-toggle .icon-bar {
- width: 20px;
- height: 2px;
- background-color: #666;
- }
-
- .light-theme .fly-header .navbar-toggle .icon-bar {
- background-color: #333;
- }
-
- /* 页脚 */
- .fly-footer {
- margin-top: 25px;
- border-top: none;
- }
- }
|