Skip to content

Commit 2691a90

Browse files
committed
fix: 悬浮球添加微信群聊图标
1 parent fdce49e commit 2691a90

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/components/WechatFloat.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,31 @@
1111
background: #07c160;
1212
border-radius: 50%;
1313
display: flex;
14+
flex-direction: column;
1415
align-items: center;
1516
justify-content: center;
1617
cursor: pointer;
1718
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
1819
transition: transform 0.2s, box-shadow 0.2s;
20+
gap: 2px;
1921
}
2022

2123
.wechat-icon:hover {
2224
transform: scale(1.1);
2325
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
2426
}
2527

28+
.wechat-svg {
29+
width: 22px;
30+
height: 22px;
31+
}
32+
2633
.wechat-icon-text {
2734
color: white;
28-
font-size: 12px;
35+
font-size: 10px;
2936
font-weight: bold;
3037
text-align: center;
31-
line-height: 1.2;
38+
line-height: 1;
3239
}
3340

3441
.wechat-popup {

src/components/WechatFloat.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export default function WechatFloat() {
1111
onMouseLeave={() => setIsHovered(false)}
1212
>
1313
<div className="wechat-icon">
14+
<svg className="wechat-svg" viewBox="0 0 24 24" fill="white">
15+
<path d="M9.5 4C5.36 4 2 6.69 2 10c0 1.89 1.08 3.56 2.78 4.66L4 17l2.5-1.5c.89.32 1.89.5 3 .5.17 0 .34 0 .5-.02-.16-.49-.25-1-.25-1.48 0-3.31 3.36-6 7.5-6 .17 0 .33 0 .5.02C17.07 5.69 13.64 4 9.5 4zM7 9a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm5 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm5.5 2c-3.58 0-6.5 2.24-6.5 5s2.92 5 6.5 5c.87 0 1.7-.14 2.45-.4L22 22l-.78-2.33C22.31 18.56 23 17.33 23 16c0-2.76-2.92-5-6.5-5zm-2 4a1 1 0 1 1 0 2 1 1 0 0 1 0-2zm4 0a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>
16+
</svg>
1417
<span className="wechat-icon-text">交流群</span>
1518
</div>
1619
{isHovered && (

0 commit comments

Comments
 (0)