-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.css
More file actions
124 lines (110 loc) · 3.08 KB
/
Copy pathcontent.css
File metadata and controls
124 lines (110 loc) · 3.08 KB
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
/* 重置一些可能的外部样式影响 */
:root {
--primary-color: #2ECD76;
--background-color: #ffffff;
--text-color: #333333;
--border-color: #eeeeee;
--hover-color: #f5f5f5;
}
@media (prefers-color-scheme: dark) {
:root {
--background-color: #222222;
--text-color: #f0f0f0;
--border-color: #444444;
--hover-color: #333333;
}
}
#search-switcher-btn, #search-switcher-btn * {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.search-switcher-container {
position: fixed;
bottom: 80px; /* 初始位置 */
right: 0px; /* 紧贴右侧边缘 */
z-index: 9999;
display: flex;
flex-direction: row;
overflow: visible;
pointer-events: none; /* 容器不捕获鼠标事件 */
transition: none; /* 移除位置变化的动画效果 */
}
.search-switcher-icon {
width: 40px;
height: 40px;
border-radius: 20px 0 0 20px; /* 左侧圆角 */
background-color: var(--background-color, #ffffff);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
transition: background-color 0.3s ease; /* 只保留背景色变化动画 */
border: 1px solid var(--border-color, #eeeeee);
border-right: none; /* 右侧无边框,紧贴边缘 */
outline: none;
pointer-events: auto; /* 按钮可以捕获鼠标事件 */
}
.search-switcher-icon:hover {
background-color: var(--hover-color, #f5f5f5);
box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
transform: none; /* 移除鼠标悬停时的放大效果 */
}
.search-switcher-popup {
position: absolute;
right: 48px;
bottom: -20px;
width: 320px;
height: 480px;
background: transparent;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
overflow: hidden;
transition: none; /* 移除弹出窗口的过渡动画 */
pointer-events: auto; /* 弹出窗口可以捕获鼠标事件 */
}
.search-switcher-iframe {
width: 100%;
height: 100%;
border: none;
background: transparent;
}
/* 亮色模式和暗色模式适配 */
@media (prefers-color-scheme: dark) {
.search-switcher-icon {
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
background-color: var(--background-color, #222222);
border-color: var(--border-color, #444444);
}
.search-switcher-popup {
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
}
/* 拖拽相关样式 */
.search-switcher-container.dragging {
opacity: 0.8;
cursor: ns-resize !important; /* 上下拖动指针 */
transition: none;
}
.search-switcher-container.dragging .search-switcher-icon {
cursor: ns-resize !important; /* 上下拖动指针 */
transform: scale(1.1);
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}
/* 动画效果 */
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
/* 新添加时的动画效果 - 禁用 */
.search-switcher-container.new-added {
/* animation: pulse 1s ease 3; */
/* 动画已禁用 */
}
/* 保留右侧边缘样式,移除其他边缘样式 */
.search-switcher-container.edge-right .search-switcher-icon {
border-radius: 20px 0 0 20px;
border-right: none;
}