Skip to main content
正在加载
正在点亮星图
Weaving the Star Map
教程

WordPress网站导航菜单栏目增加角标

Contents

    css 代码

    /*菜单标签美化黄色*/
    .vip {
    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;
    }
    /*菜单标签美化红色*/
    .new {
    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;
    }

    /*菜单标签美化蓝色*/
    .label {
    display: inline-block;
    transform: translateY(-12px);
    font-size: .75rem;
    letter-spacing: 0.05em;
    background: linear-gradient(to right, #6454ef 0%, #3021ec 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: .15rem .275rem;
    line-height: 1;
    font-weight: bold;
    }
    /*菜单标签美化绿色*/
    .hot {
    display: inline-block;
    transform: translateY(-12px);
    font-size: .75rem;
    letter-spacing: 0.05em;
    background: linear-gradient(to right, #02C874 0%, #00BB00 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: .15rem .275rem;
    line-height: 1;
    font-weight: bold;
    }

     

    <span class="hot">推荐</span> 显示的是绿色,大家可以自定义颜色代码
    
    de328-1c88b-2.png
    Copyright
    The copyright of the article belongs to the author, please do not reprint without permission.

    Related posts

    Comments No comments yet

    Write a comment Sign in to join the discussion

    No comments yet

    Add some experience, ask a question, or point out what's wrong — it all helps whoever reads this later. Not sure where to start? Pick one:

    Was this useful to you? Have you been through something similar? Anything you'd like to follow up on?

    Write a comment

    Visitor Just a nickname to comment
    0 / 800

    Not shown publicly.