Skip to content

Commit c865557

Browse files
committed
Update injectcss.ts
1 parent 4abd96e commit c865557

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

pages/content/src/injectcss.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,33 @@ export const injectCss = () => {
4242
}
4343
4444
.rwkvOfflineTranslationResult {
45-
/* */
45+
/* 基础样式 */
46+
transition: all 0.2s ease-in-out;
47+
cursor: pointer;
48+
border-radius: 4px;
49+
opacity: 0.8;
50+
}
51+
52+
/* 浅色主题下的 hover 效果 */
53+
@media (prefers-color-scheme: light) {
54+
.rwkvOfflineTranslationResult:hover:not(.rwkvInspecting) {
55+
background-color: rgba(0, 0, 0, 0.1) !important;
56+
color: #1a1a1a !important;
57+
opacity: 1;
58+
transform: translateY(-1px);
59+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
60+
}
61+
}
62+
63+
/* 深色主题下的 hover 效果 */
64+
@media (prefers-color-scheme: dark) {
65+
.rwkvOfflineTranslationResult:hover:not(.rwkvInspecting) {
66+
background-color: rgba(255, 255, 255, 0.15) !important;
67+
color: #ffffff !important;
68+
opacity: 1;
69+
transform: translateY(-1px);
70+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
71+
}
4672
}
4773
4874
.rwkvOfflineTranslationResult.rwkvInspecting {

0 commit comments

Comments
 (0)