美化头部样式阴影

This commit is contained in:
linxd
2025-07-03 11:33:07 +08:00
parent 1642b5ad81
commit 92a92b17cf
2 changed files with 32 additions and 26 deletions

View File

@ -1,27 +1,31 @@
@import '../baseStyle.less'; @import '../baseStyle.less';
.header { .header-container {
position: relative; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
z-index: 1; .header {
display: flex; position: relative;
align-items: center; z-index: 1;
justify-content: space-between; display: flex;
width: @width; align-items: center;
margin: 0 auto; justify-content: space-between;
.logo { width: @width;
height: 45px; margin: 0 auto;
.logo {
height: 45px;
}
.header-menu {
display: flex;
flex: 1;
align-items: center;
justify-content: flex-end;
.ant-menu-horizontal {
line-height: 58px;
border: none;
}
}
.user {
margin-left: 15px;
}
} }
} }
.header-menu {
display: flex;
flex: 1;
align-items: center;
justify-content: flex-end;
.ant-menu-horizontal {
line-height: 58px;
border: none;
}
}
.user {
margin-left: 15px;
}

View File

@ -7,9 +7,11 @@ import './Header.less';
import HeaderMenu from './HeaderMenu'; import HeaderMenu from './HeaderMenu';
const Header: React.FC = (props) => { const Header: React.FC = (props) => {
return ( return (
<div className="header"> <div className="header-container">
<img className='logo' src={LogoImg} alt="logo" /> <div className="header">
<HeaderMenu /> <img className="logo" src={LogoImg} alt="logo" />
<HeaderMenu />
</div>
</div> </div>
); );
}; };