antd-moblie-tabs modify style tab underline pseudo-element writing

In the Tabs tab page in antd-mobile2.x version , there is no attribute that can directly modify the tab underline style. For this we can only modify the default style to add pseudo-elements to it.

The specific method is as follows: (the class name, we can get it by examining the element, I am just an example, the actual situation shall prevail)

 .am-tabs-default-bar-tab-active::after {
    position: absolute;
    bottom: -8px;
    content: '';
    width: 110px;
    height: 4px;
    background:  #1677FF;
    left: 50%;
    transform: translateX(-50%);
  }

Guess you like

Origin blog.csdn.net/congxue666/article/details/128792757