Skip to content

Commit 62f0763

Browse files
committed
优化导航栏logo:去除内边距,添加渐变边框效果
1 parent 3ffa4d8 commit 62f0763

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

src/components/NavBar.tsx

+25-9
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,31 @@ const NavBar = () => {
7676
{/* Logo区域,确保与内容区域左边缘对齐 */}
7777
<Col className="logo-container" style={{ paddingLeft: '0px' }}>
7878
<Link to="/" style={{ display: 'flex', alignItems: 'center', height: '70px' }}>
79-
<img
80-
src={logoPng}
81-
alt="Web Crawler Challenge Platform"
82-
style={{
83-
height: '46px',
84-
width: 'auto',
85-
marginRight: '12px'
86-
}}
87-
/>
79+
<div style={{
80+
display: 'flex',
81+
alignItems: 'center',
82+
justifyContent: 'center',
83+
padding: 0,
84+
marginRight: '12px',
85+
position: 'relative',
86+
overflow: 'hidden',
87+
borderRadius: '8px',
88+
height: '46px',
89+
width: '46px',
90+
background: 'linear-gradient(145deg, #ffffff 60%, rgba(255,255,255,0))'
91+
}}>
92+
<img
93+
src={logoPng}
94+
alt="Web Crawler Challenge Platform"
95+
style={{
96+
height: '46px',
97+
width: '46px',
98+
objectFit: 'contain',
99+
padding: 0,
100+
margin: 0
101+
}}
102+
/>
103+
</div>
88104
<Title level={3} style={{margin: 0, color: '#2c3e50', whiteSpace: 'nowrap'}}>
89105
Crawler LeetCode
90106
</Title>

0 commit comments

Comments
 (0)