请选择 进入手机版 | 继续访问电脑版

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

 找回密码
 立即注册
12
返回列表 发新帖
楼主: admin

SubMenu子菜单导航功能示范脚本

[复制链接]
 楼主| 发表于 2018-4-23 17:43:18 | 显示全部楼层

.nav-thumb-list-circle


<div class="bg-light"><div class="container nav-thumb-list-circle">$func_submenu(navi=Navigator,title=0,para=IPR,rows=5,subimg=1,submemo=1,sub=1,mode=2,divi=none)$</div></div>
CSS
.nav-thumb-list-circle ul{display: flex; flex-direction: row; flex-wrap:nowrap; justify-content: space-between; text-align:center;}
.nav-thumb-list-circle ul li{ float:left; flex: 1; margin:10px;}
.nav-thumb-list-circle ul li .more{ display:none;}
.nav-thumb-list-circle ul li .thumbs{ display:flex; align-items: center; justify-content: center;}
.nav-thumb-list-circle ul li .thumbs img{ width:50%; height:50%; border-radius:50%;}
.nav-thumb-list-circle ul li .title .cn,.nav-thumb-list-circle ul li .title .cn a{ display:block; font-weight:bold; color:#1F5BA3;}
.nav-thumb-list-circle ul li .title .en,.nav-thumb-list-circle ul li .title .en a{ color:#1F5BA3;}
.nav-thumb-list-circle ul li .title a{ display: block; font-weight:bold; font-size: 16px; line-height: 40px;}
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-5-23 10:49:53 | 显示全部楼层

zyipm.submenu.css

zyipm.jpg
DIV:
<div class="adv wrap">$func_submenu(para=Advantage,title=0,mode=10,rows=3,subtitle=1,subimg=1,submemo=1,divi=none)$</div>
CSS:
.adv .Margin ul{ display: flex; flex-flow: row nowrap; justify-content: space-between; margin-top:30px;}
.adv ul li{ flex: 1; margin: 40px 0; border: 10px solid #46A6EC; background: #46A6EC;}
.adv ul li:nth-child(2) {margin-left: 90px; margin-right:90px;}
.adv .mode{ position: relative;}
.adv .mode h3{padding: 10px 0; text-align: center;}
.adv .mode h4{ position: absolute; border: 12px solid rgb(70, 166, 235,.3); width: 80px; height:80px; left:calc(50% - 45px); top: -45px; border-radius:40px;}
.adv .mode h4 a{ display:block;text-align: center; line-height:55px; width: 100%; height: 100%; font-size: 16px; background: #46A6EC; border-radius: 30px;}
回复 支持 反对

使用道具 举报

 楼主| 发表于 2019-8-23 22:10:44 | 显示全部楼层

随机关键词搜索示范

ggdymy.jpg
设计要点:超过10个关键词随机选择。
DIV:
<div class="keyword">$func_submenu(navi=Nav,para=Search,memo=1)$</div>
CSS:
.keyword .Descript{display:flex; flex-flow:row wrap;justify-content: space-between;padding-top:10px; padding-bottom: 20px;}
.keyword .Descript a{ padding:10px;cursor: pointer;}

JS:
$(function () {
    var kw = $(".keyword").find(".Descript").html();
    var k = kw.split(' ');
    var kws = [];
    var html = "";
    for (var i = 0; i < k.length; i++) {
        if (k != "") {
            kws.push(k);
        }
    }
    var rand = [];
    rand = rnd(0, kws.length, 10);
    for (var i = 0; i < rand.length; i++) {
        html = html + "<a>" + kws[rand] + "</a>"
    }
    $(".keyword").find(".Descript").html(html).find("a").on("click", function () {
        var kw = $(this).html();
        $.send("",{kw:kw,so:1});
    });
})

function rnd(min, max, count) {
    var randoms = [];
    while (true) {
        var isExists = false;
        var random = parseInt(min + (max - min) * (Math.random()))
        for (var i = 0; i < randoms.length; i++) {
            if (random === randoms) {
                isExists = true;
                break;
            }
        }
        if (!isExists)
            randoms.push(random);
        if (randoms.length === count)
            break;
    }
    return randoms;
}



回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-9-3 12:52:37 | 显示全部楼层
模板:220828
DIV:
<div class="container-xxl product justify-content-center ul-col ul-lg-5">
    $func_submenu(para=product,sub=1,divi=none,rows=10,mode=2,bg=1,submemo=1,subimg=1,submore=3)$
</div>

submenu.220828.jpg
CSS:
.product {
    ul {
        li {
            .mode {
                .thumbs {
                    align-items: center;
                    background: url(../img/bg.png) $fst;
                    border-radius: 1rem;
                    height: 150px;
                    margin-bottom: -2rem;

                    img {
                        max-height: 68px;
                    }
                }

                .title {
                    margin-left: 1rem;
                    margin-right: 1rem;
                    background-color: $gray-200;
                    border-top-left-radius: 1rem;
                    border-top-right-radius: 1rem;
                    padding-top: 2rem;

                    a {
                        font-size: 24px !important;
                        font-weight: 700;
                    }
                }

                .memo {
                    margin-left: 1rem;
                    margin-right: 1rem;
                    color: $gray-600;
                    padding: 1rem;
                    background-color: $gray-200;
                }

                .more {
                    margin-left: 1rem;
                    margin-right: 1rem;
                    background-color: $gray-200;
                    border-bottom-left-radius: 1rem;
                    border-bottom-right-radius: 1rem;
                    padding-bottom: 2rem;

                    a {
                        padding:8px 25px;
                        color: $sec;
                        font-size: 16px;

                        &:hover{
                            border-radius: .5rem;
                            background:$sec;
                            color:white;
                            transition: all 1s ease-in;
                        }
                    }
                }
            }
        }
    }
}

回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-9-5 00:30:33 | 显示全部楼层

模板:SubMenu.220901

submenu.220901.jpg
DIV:
<div class="product justify-content-center ul-col ratio-thumbs" ratio="4:3">
    $func_submenu(para=product,sub=1,divi=none,rows=10,bg=1,mode=3,submemo=1,subimg=3,submore=3)$
</div>
这儿显示图片的比率为4:3,由.ratio-thumbs来确定是对thumbs进行ratio=4:3控制。

CSS:
.product {
    ul {
        li {
            background-color: $gray-300;
            background-clip: content-box;
            flex-flow: row nowrap;
            flex-basis: 100%;
            padding-bottom: 0;

            .thumbs {
                display: flex;
                flex: 1 0 150px;
                padding: 0;
                margin: 0 15px 0 0;
                overflow: hidden;

                img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }
            }

            .mode {
                text-align: left;
                padding: 1rem;

                .title {
                    a {
                        padding: 0 !important;
                        margin: 0;
                        line-height: 2.2em;
                        font-weight: 800;
                        font-size: 1.8rem !important;
                    }
                }

                .more {
                    margin-top: 1rem;

                    a {
                        line-height: 3em;
                    }
                }
            }

        }
    }
}
@include media-breakpoint-up(sm) {
    .product {
        ul li {
            display: flex;
            flex-flow: column wrap;
            flex-basis: 50%;
            padding: 1.5rem;

            .thumbs {
                flex-basis: auto;
                margin-right: 0;
            }

            &:first-child {
                flex-basis: 100%;
            }

            .mode {
                padding:2rem;
            }
        }
    }
}

@include media-breakpoint-up(lg) {
    .product {
        ul {
            li {
                flex-basis: 33.33%;

                .mode {
                    padding: 2rem;
                }

                &:first-child {
                    flex-basis: 66.66%;
                }

                &:nth-child(-n+2) {
                    .thumbs {
                        max-height: 468px;
                    }

                    .mode {
                        position: absolute;
                        width: calc(100% - 3rem);
                        bottom: 1.5rem;
                        background-color: rgba($white, .8);
                    }
                }
            }
        }
    }
}


回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-3-28 22:10 , Processed in 0.103509 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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