Antd not modify the modified style selector

  1. According to the official website of the modified API

  2. Directly add style to be modified

Important: If you can not directly modify the style of components, how to modify its default style it?

Solution: Modify antd global style
open F12 Inspect Element console, find the need to modify the elements
Here Insert Picture Description
of the arrows in Figure selectors are antd, our project is not directly if modified
by globalmodification to the global keyword become effective

:global(.ant-tabs .ant-tabs-left-bar .ant-tabs-tab) {
  text-align: left;
}
:global(.ant-tabs-nav .ant-tabs-tab-active) {
  background: #E6F7FF;
}

Here Insert Picture Description
Here is a tip: Because this is a global modify the style, it will affect other components, you need to change by giving the parent element plus a package, with a global increase when a parent selector

Published 79 original articles · won praise 1 · views 3059

Guess you like

Origin blog.csdn.net/qq_43382853/article/details/104476658