简体   繁体   中英

Fixed navbar doesn't work properly?

I'm newbie to blogger. I got a 3rd-party template and made changes to the navibar on the main homepage that when scroll its color changes to blue and links to White.

But on Posts Page the color of the links on Scroll don't change. I mean, When you scroll, the navibar links don't change to white as the main homepage, why ? I tried to change the color of links of the fixed navibar{on posts page} but it doesn't apply at all.

帖子页面NaviBar

帖子页面固定导航栏

Here is the code of the links that i want it to change to white while scrolling down:

.item .menu-secondary li a, 
.static_page .menu-secondary li a {
            color: #484848;

Try this

.fixed-nav {
    width: 100%;
    z-index: 999999;
    position: fixed;
    background: white!important;
    transition: all 1s ease;
}

Add this to your custom css in customizer.

.item header .logo h1 a, .static_page header .logo h1 a {
    color: #FFF;
}

.item .menu-secondary li a, .static_page .menu-secondary li a {
    color: #FFF;
}

For more RGBA colours you can click here

Try this

.item #navbar:not(.fixed-nav) .menu-secondary li a, 
.static_page #navbar:not(.fixed-nav) .menu-secondary li a {
    color: #484848;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM