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

renyi818 picture renyi818  ·  3Comments

yaoleiroyal picture yaoleiroyal  ·  3Comments

lvzheng0404 picture lvzheng0404  ·  3Comments

suifan picture suifan  ·  3Comments

yjz1004 picture yjz1004  ·  3Comments