react ant-menu-item-selected选中的菜单样式修改

之前引入的方式是

import styles from './index.less';

然后我在index.less里修改,没有一点反应,后来发现上面引入的方式只是把样式导进去,用不用不清楚,这个时候需要加上

import './index.less';

然后index.less里面的样式就可以生效了

.ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-selected{
    background-color:#2970FF;
}
posted @ 2021-07-22 17:52  neverthelessing  阅读(617)  评论(0)    收藏  举报