弘帝企业智能建站系统交流平台

 找回密码
 立即注册
查看: 2828|回复: 2

MENU菜单功能示范脚本

[复制链接]
发表于 2018-1-15 22:01:52 | 显示全部楼层 |阅读模式
重大调整,弘帝框架及弘帝HTML6全面替代原MENU设计思想
新的HTML6代码:
<navbar-toggler class="本功能样式" btn="手机菜单按纽的样式" tar="调用的目录菜单ID" menu="目录菜单的手机样式" show="默认手机的菜单项是否显示"></navbar-toggler>
navbar-toogler暂时用bootstrap命名法,此标签可显示在任意位置。

弘帝启用FLEX技术全面取代老式排版
zgghczy.jpg
DIV:
<div class="menu">$func_menu(pos=0,divi=none)$</div>

CSS:
.menu{ height: 60px; background: #5A342b;text-align: center;}
.menu .MenuCenter{ display:block; width:1200px; margin: 0 auto;}
.menu ul{ display: flex; justify-content: center; flex-direction: row;}
.menu ul li{flex-grow:1;}
.menu ul li a{ display:block; color: #fff; line-height: 60px; font-size: 15px;}
.menu ul li a:hover,.menu ul .sel a{ background:#472922;}

JS:
$(function(){var o=jQuery(".menu ul li .sel");$(function(){$(".menu ul li").hover(function(){o.removeClass();$(this).children("ul").slideDown()},function(){o.addClass("sel");$(this).children("ul").slideUp()})})});
回复

使用道具 举报

 楼主| 发表于 2019-8-17 22:10:35 | 显示全部楼层
固定底部的菜单
fixed-bottom.jpg
DIV:
<div class="fixed-bottom w-100 blue hidden-lg">$func_menu(pos=1,divi=none)$</div>
SCSS:须加载hondy.css
  1. .fixed-bottom {
  2.     .on a:hover {
  3.         color: $white;
  4.     }

  5.     ul li {
  6.         text-align: center;

  7.         &::before {
  8.             margin: 0 auto;
  9.             font-size: 24px;
  10.             justify-content: center;
  11.         }

  12.         &:nth-child(1):before {
  13.             text-align: center;
  14.             content: '\f015';
  15.         }

  16.         &:nth-child(2)::before {
  17.             content: '\f097';
  18.         }

  19.         &:nth-child(3)::before {
  20.             content: '\f07a';
  21.         }

  22.         &:nth-child(4)::before {
  23.             content: '\f098';
  24.         }

  25.         a {
  26.             padding: 0;
  27.             font-size: 12px;
  28.         }
  29.     }
  30. }
复制代码




回复 支持 反对

使用道具 举报

 楼主| 发表于 2019-8-18 15:41:51 | 显示全部楼层
soft.jpg
DIV:
<div class="py-3">
        <div class="container">
                <div class="row">
                        <div class="logo col-lg-3">$show_logo$</div>
                        <div class="red menu col-lg-9 menu-lg-underline">$func_menu(pos=0,divi=none,sub=1)$</div>
                </div>
        </div>
</div>


CSS:
  1. .red {
  2.     background: $red;
  3.     color: $white;

  4.     menu {
  5.         ul {
  6.             li {
  7.                 a {
  8.                     color: $white;
  9.                 }

  10.                 &.on,
  11.                 &:hover {
  12.                     a {
  13.                         background: $orange;
  14.                     }

  15.                     ul {

  16.                         li {
  17.                             a {
  18.                                 &:hover {
  19.                                     color: $white;
  20.                                 }
  21.                             }
  22.                         }
  23.                     }
  24.                 }
  25.             }
  26.         }

  27.     }
  28. }

  29.     .menu-lg-underline {
  30.         background: transparent;
  31.         color: inherit;

  32.         ul {
  33.             li {
  34.                 text-align: center;

  35.                 a {
  36.                     display: inline-flex;
  37.                     color: inherit !important;
  38.                     border-bottom: 2px solid transparent;

  39.                     b {
  40.                         display: none;
  41.                     }
  42.                 }

  43.                 &.on,
  44.                 &:hover {


  45.                     a {
  46.                         background: $white !important;
  47.                         color: inherit;
  48.                         border-bottom: 2px solid $red;
  49.                     }

  50.                     ul {
  51.                         background: $red;

  52.                         li {
  53.                             background: $red;

  54.                             a {
  55.                                 background: $red !important;
  56.                                 display: flex;
  57.                                 white-space: nowrap;
  58.                                 text-align: left;
  59.                                 padding-left: 40px;
  60.                                 padding-right: 40px;
  61.                                 justify-content: left;
  62.                                 border-bottom: 0 !important;
  63.                                 color: $white !important;

  64.                                 &:hover {
  65.                                     background: $gray !important;
  66.                                     color: inherit !important;

  67.                                     &::before {
  68.                                         margin-left:-20px;
  69.                                         content: '\f02e';
  70.                                         margin-right: 10px;
  71.                                         color: $orange;
  72.                                     }
  73.                                 }
  74.                             }
  75.                         }
  76.                     }
  77.                 }

  78.                 ul {
  79.                     background: $red;
  80.                     left: 0;
  81.                     margin-top: -2px;
  82.                     width: auto;

  83.                 }
  84.             }
  85.         }
  86.     }
复制代码

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|弘帝企业智能建站系统 ( 皖ICP备07503252号 )

GMT+8, 2024-9-8 09:58 , Processed in 0.077802 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表