Skip to content

Commit ade86e9

Browse files
committed
style(docs): 为购买授权按钮添加折扣标签样式
添加首页 Hero 区和顶栏导航中购买授权按钮的折扣标签样式,使用红色背景和旋转效果突出显示
1 parent 93d6a24 commit ade86e9

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

docs/.vitepress/theme/styles/global.scss

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,44 @@ a{
9696
.dark .content {
9797
background-color: #1a1a1a;
9898
}
99+
100+
/* 购买授权按钮与导航的折扣标签样式 */
101+
/* 首页 Hero 区的“购买授权”按钮 */
102+
a[href="/empower/index.html"] {
103+
position: relative;
104+
}
105+
a[href="/empower/index.html"]::after {
106+
content: "折扣";
107+
position: absolute;
108+
top: -8px;
109+
right: -8px;
110+
background: #ef4444; /* red-500 */
111+
color: #fff;
112+
font-size: 11px;
113+
line-height: 1;
114+
padding: 3px 8px;
115+
border-radius: 9999px;
116+
box-shadow: 0 2px 6px rgba(0,0,0,.15);
117+
transform: rotate(8deg);
118+
pointer-events: none;
119+
}
120+
121+
/* 顶栏导航中的“购买授权” */
122+
.VPNavBar a[href="https://plugin.gin-vue-admin.com/license"] {
123+
position: relative;
124+
}
125+
.VPNavBar a[href="https://plugin.gin-vue-admin.com/license"]::after {
126+
content: "折扣";
127+
position: absolute;
128+
top: -6px;
129+
right: -6px;
130+
background: #ef4444; /* red-500 */
131+
color: #fff;
132+
font-size: 10px;
133+
line-height: 1;
134+
padding: 2px 6px;
135+
border-radius: 9999px;
136+
box-shadow: 0 2px 6px rgba(0,0,0,.15);
137+
transform: rotate(8deg);
138+
pointer-events: none;
139+
}

0 commit comments

Comments
 (0)