浏览器插件:划词翻译

个人自用样式分享

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
:root {
--background-img: url("https://s2.loli.net/2023/12/30/3FovXfsi1JA29rS.jpg");
--textarea-background-color: linear-gradient(
to bottom,
rgba(76, 108, 179, 0.6),
rgba(57, 197, 187, 0.6) 150%
);
--textarea-color: #ebe1a9;
}

/* 网页划词隐藏输入框 */
#app #popper-container .query-text {
display: none;
}

#translate-panel,
.bp5-dark #translate-panel {
border-radius: 10px;
font-size: 15px !important;
font-family: "萝莉体 第二版" !important;

h6.bp5-heading {
font-size: 15px !important;
color: #fff;
}

/* 输入框背景 */
textarea.bp5-input {
background: var(--textarea-background-color) !important;
font-family: "萝莉体 第二版" !important;
color: var(--textarea-color);
}

textarea.bp5-input:focus {
box-shadow: inset 0 0 0 1px #39c5bb, inset 0 0 0 1px #39c5bb,
0 0 0 2px rgba(244, 179, 194, 0.3);
}

textarea.bp5-input::-webkit-input-placeholder {
color: #5a79ba;
}

/* 翻译框 */
.bp5-card {
background: linear-gradient(
to right bottom,
rgba(153, 94, 137, 0.7),
rgba(0, 148, 200, 0.7) 150%
) !important;
}

/* 输入框 */
.query-text textarea.bp5-input {
min-height: 80px;
}

.query-text .clear-btn .bp5-icon-cross {
color: skyblue;
}

/* 滚动条 */
.body {
overflow-x: hidden;
}
.body::-webkit-scrollbar-thumb {
background: linear-gradient(
to bottom,
rgba(57, 197, 187, 0.7),
rgba(0, 148, 200, 0.7) 150%
) !important;
}

/* 词性&来源 */
.result-block {
color: #f3f3f3 !important;

.lang-select.bp5-popover-target {
white-space: nowrap;
}
}

.result-block .dict-pos {
margin-right: 5px;
color: #f08300;
}

.bp5-button .bp5-icon,
.bp5-button .bp5-icon-large,
.bp5-button .bp5-icon-standard {
color: #1e50a2;
}
}

#translate-panel {
/* 浅色模式下的面板样式 */
background: linear-gradient(to right bottom, pink, skyblue);
background: var(
--background-img,
url("https://s2.loli.net/2023/12/30/3FovXfsi1JA29rS.jpg")
) !important;
background-repeat: no-repeat !important;
background-position: top center !important;
background-size: cover !important;
}

.bp5-dark #translate-panel {
/* 深色模式下的面板样式 */
background: linear-gradient(to right bottom, pink, skyblue);
background: var(
--background-img,
url("https://s2.loli.net/2023/12/30/3FovXfsi1JA29rS.jpg")
) !important;
background-repeat: no-repeat !important;
background-position: top center !important;
background-size: cover !important;
}

/*自动折行*/
#translate-panel {
.bp5-elevation-0 {
margin: 0;
}

.body {
display: flex;
flex-wrap: wrap;
column-gap: 10px;
row-gap: 10px;
}

.result-block {
min-width: 220px;
min-height: 45px;
flex: 1;
}

.external-translators {
margin-top: 5px;
display: flex;
width: 100%;
justify-content: center;
gap: 10px;

> * {
margin:0;
}
}

.quick-links {
display: flex;
width: 100%;
justify-content: center;
}
}