修改头部选中样式

This commit is contained in:
caishi 2021-06-28 16:02:25 +08:00
commit 8162b8b908
2 changed files with 18 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import 'antd/lib/checkbox/style/index.css';
import 'antd/lib/radio/style/index.css';
import 'antd/lib/input/style/index.css';
import './TPMIndex.css';
import './css/headerExcess.css';
import logo from './images/logo.png';
const $ = window.$
@ -573,11 +574,16 @@ class NewHeader extends Component {
matchpaths = (url) => {
const { match } = this.props;
console.log(url);
console.log(match);
if(url){
if (url.indexOf('forums') > -1 && match.path.indexOf('forums') > -1) {
return true
} else if (url.indexOf('projects') > -1 && match.path.indexOf('projects') > -1) {
return true
} else if (url.indexOf('notice') > -1 && match.path.indexOf('notice') > -1) {
return true
} else if (url.indexOf('users') > -1 && match.path.indexOf('users') > -1) {
return true
} else {

View File

@ -0,0 +1,12 @@
.head-nav ul#header-nav li:hover a, .head-nav ul#header-nav li.active a{
color: #1484EF;
}
.head-nav ul#header-nav li.active a::after{
content: "";
width: 100%;
height:2px;
background-color: #1484EF;
left:0px;
bottom: 12px;
position: absolute;
}