B2主题美化_B2主题添加菜单角标

演示

图片[1]-B2主题美化_B2主题添加菜单角标-岸边IBIAN

紅色

.primary-menu small {
    display: inline-block;
    transform: translateY(-12px);
    font-size: .75rem;
    letter-spacing: 0.05em;
    background: linear-gradient(to top, #f308a0 0%, #fb0655 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: .15rem .275rem;
    line-height: 1;
    font-weight: bold;
}

黃色

.primary-menu small {
    display: inline-block;
    transform: translateY(-12px);
    font-size: .75rem;
    letter-spacing: 0.05em;
    background: linear-gradient(to top, #efd3b0 0%, #f9e1be 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: .15rem .275rem;
    line-height: 1;
    font-weight: bold;
}

藍色

.primary-menu small {
    display: inline-block;
    -webkit-transform: translateY(-12px);
    -ms-transform: translateY(-12px);
    transform: translateY(-12px);
    font-size: .75rem;
    letter-spacing: 0.05em;
    background: #188ef4;
    background: -webkit-linear-gradient(legacy-direction(to right), #6454ef 0%, #316ce8 100%);
    background: -webkit-gradient(linear, left top, right top, from(#6454ef), to(#316ce8));
    background: -webkit-linear-gradient(left, #6454ef 0%, #316ce8 100%);
    background: -o-linear-gradient(left, #6454ef 0%, #3021ec 100%);
    background: linear-gradient(to right, #6454ef 0%, #3021ec 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: .15rem .275rem;
    line-height: 1;
    font-weight: bold;
}

黄色

.primary-menu small {
     display: inline-block;
    -webkit-transform: translateY(-12px);
    -ms-transform: translateY(-12px);
    transform: translateY(-12px);
    font-size: .75rem;
    letter-spacing: 0.05em;
    background: #f9e1be;
    background: -webkit-linear-gradient(legacy-direction(to right), #efd3b0 0%, #f9e1be 100%);
    background: -webkit-gradient(linear, left top, right top, from(#efd3b0), to(#f9e1be));
    background: -webkit-linear-gradient(left, #efd3b0 0%, #f9e1be 100%);
    background: -o-linear-gradient(left, #efd3b0 0%, #f9e1be 100%);
    background: linear-gradient(to top, #efd3b0 0%, #f9e1be 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: .15rem .275rem;
    line-height: 1;
    font-weight: bold;
}

如果你用的是B2主题,可以直接替换为:(前面#号复制记得去掉)<code>#.top-menu-ul small{</code>

本文来自:https://www.miuiy.com/6222.html

图片[2]-B2主题美化_B2主题添加菜单角标-岸边IBIAN

方法如下:

在你的菜单中添加如下代码:

<small>推荐</small>
图片[1]-B2主题美化_B2主题添加菜单角标-岸边IBIAN

紅色

.primary-menu small {
    display: inline-block;
    transform: translateY(-12px);
    font-size: .75rem;
    letter-spacing: 0.05em;
    background: linear-gradient(to top, #f308a0 0%, #fb0655 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: .15rem .275rem;
    line-height: 1;
    font-weight: bold;
}

黃色

.primary-menu small {
    display: inline-block;
    transform: translateY(-12px);
    font-size: .75rem;
    letter-spacing: 0.05em;
    background: linear-gradient(to top, #efd3b0 0%, #f9e1be 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: .15rem .275rem;
    line-height: 1;
    font-weight: bold;
}

藍色

.primary-menu small {
    display: inline-block;
    -webkit-transform: translateY(-12px);
    -ms-transform: translateY(-12px);
    transform: translateY(-12px);
    font-size: .75rem;
    letter-spacing: 0.05em;
    background: #188ef4;
    background: -webkit-linear-gradient(legacy-direction(to right), #6454ef 0%, #316ce8 100%);
    background: -webkit-gradient(linear, left top, right top, from(#6454ef), to(#316ce8));
    background: -webkit-linear-gradient(left, #6454ef 0%, #316ce8 100%);
    background: -o-linear-gradient(left, #6454ef 0%, #3021ec 100%);
    background: linear-gradient(to right, #6454ef 0%, #3021ec 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: .15rem .275rem;
    line-height: 1;
    font-weight: bold;
}

黄色

.primary-menu small {
     display: inline-block;
    -webkit-transform: translateY(-12px);
    -ms-transform: translateY(-12px);
    transform: translateY(-12px);
    font-size: .75rem;
    letter-spacing: 0.05em;
    background: #f9e1be;
    background: -webkit-linear-gradient(legacy-direction(to right), #efd3b0 0%, #f9e1be 100%);
    background: -webkit-gradient(linear, left top, right top, from(#efd3b0), to(#f9e1be));
    background: -webkit-linear-gradient(left, #efd3b0 0%, #f9e1be 100%);
    background: -o-linear-gradient(left, #efd3b0 0%, #f9e1be 100%);
    background: linear-gradient(to top, #efd3b0 0%, #f9e1be 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: .15rem .275rem;
    line-height: 1;
    font-weight: bold;
}

如果你用的是B2主题,可以直接替换为:(前面#号复制记得去掉)<code>#.top-menu-ul small{</code>

本文来自:https://www.miuiy.com/6222.html

THE END
点赞0 分享
抢沙发
头像
提交
头像

昵称

取消
昵称表情

    暂无评论内容