简体   繁体   中英

How to change the menu background color

我想将此颜色更改为#ff0
when i search in style.css I found this

.menu-primary li a:hover, .menu-primary li a:active, .menu-primary li a:focus, 
.menu-primary li:hover > a, .menu-primary li.current-cat > a, .menu-primary li.current_page_item > a, .menu-primary li.current-menu-item > a {
    color: #DD363D;
    outline: 0;
    border-bottom: 2px solid #DE4349;
    margin-bottom: -2px;
}

and the value of background is
.menu-primary li li a:hover, .menu-primary li li a:active, .menu-primary li li a:focus, .menu-primary li li:hover > a, .menu-primary li li.current-cat > a, .menu-primary li li.current_page_item > a, .menu-primary li li.current-menu-item > a { color: #FFFFFF; background: #DD2F35; outline: 0; text-decoration: none; border: 0; margin-bottom: 0;

when i change the color value didn't affect ? the un visited hover link and menu background have the same color ? how to change it ?

color: #000 = The color of the font.

background-color: #000 = The color of that element's background.

Try this out:

.menu-primary{
   background-color: #000000;
}

What you have previously worked on the color of the text, not the background. The code above changes the background color of the menu class.

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