修复边框问题

This commit is contained in:
张成
2025-11-08 12:56:17 +08:00
parent 2113b83b01
commit ff19a61a86
5 changed files with 56 additions and 18 deletions

View File

@@ -58,17 +58,38 @@
padding: 6px 16px;
border-radius: 20px;
white-space: nowrap;
position: relative;
background: transparent !important;
// 使用伪元素实现真正的 0.5px 边框
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 200%;
height: 200%;
border: 1px solid;
border-radius: 40px; // 20px * 2
transform: scale(0.5);
transform-origin: 0 0;
pointer-events: none;
box-sizing: border-box;
}
.button_text {
font-family: PingFang SC;
font-weight: 400;
font-size: 12px;
line-height: 16px;
position: relative;
z-index: 1;
}
&.follow_button {
border: 0.5px solid #000000 !important;
background: transparent !important;
&::before {
border-color: #000000;
}
.button_text {
color: #000000 !important;
@@ -76,8 +97,9 @@
}
&.following_button {
border: 0.5px solid rgba(120, 120, 128, 0.12) !important;
background: transparent !important;
&::before {
border-color: rgba(120, 120, 128, 0.2);
}
.button_text {
color: rgba(0, 0, 0, 0.8) !important;
@@ -85,8 +107,9 @@
}
&.mutual_button {
border: 0.5px solid rgba(120, 120, 128, 0.12) !important;
background: transparent !important;
&::before {
border-color: rgba(120, 120, 128, 0.2);
}
.button_text {
color: rgba(0, 0, 0, 0.8) !important;