Ant-design-pro: Change nav menu background color

Created on 19 Sep 2018  ·  1Comment  ·  Source: ant-design/ant-design-pro

How do I change the background of this nav menu bar?

Most helpful comment

import ant-design CSS in App.css using following command:
@import '~antd/dist/antd.css';

and copy paste following command to change background color of current selected menu option:

.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
    background: transparent;
}

and to change background you can use either of given options:

  1. in <Menu> use theme='dark' or 'light' i.e. <Menu theme='light'>

or

    2.
.ant-menu{
background: your-color;
}

>All comments

import ant-design CSS in App.css using following command:
@import '~antd/dist/antd.css';

and copy paste following command to change background color of current selected menu option:

.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
    background: transparent;
}

and to change background you can use either of given options:

  1. in <Menu> use theme='dark' or 'light' i.e. <Menu theme='light'>

or

    2.
.ant-menu{
background: your-color;
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhuanglong picture zhuanglong  ·  3Comments

yadongxie150 picture yadongxie150  ·  3Comments

ghost picture ghost  ·  3Comments

kaoding picture kaoding  ·  3Comments

952425340 picture 952425340  ·  3Comments