generated from dellevin/template
111
This commit is contained in:
@@ -4,6 +4,177 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 搜索功能样式 */
|
||||
.search-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
z-index: 9999;
|
||||
display: none;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.search-overlay.active {
|
||||
display: flex;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* 常驻搜索模式:背景保持模糊,阻止页面交互 */
|
||||
body.persistent-search-mode .search-overlay {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
pointer-events: auto; /* 确保遮罩层接收点击事件以阻止页面交互 */
|
||||
}
|
||||
|
||||
body.persistent-search-mode .search-modal {
|
||||
pointer-events: auto;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.search-modal {
|
||||
position: relative;
|
||||
width: 90%;
|
||||
max-width: 600px;
|
||||
transform: translateY(-20px);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.search-lock-btn {
|
||||
position: absolute;
|
||||
top: -45px;
|
||||
right: 0;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border: 1px solid rgba(255, 255, 255, 0.4);
|
||||
color: #fff;
|
||||
padding: 8px;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.search-lock-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.search-lock-btn.locked {
|
||||
background: #1a73e8;
|
||||
border-color: #1a73e8;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.search-overlay.active .search-modal {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.search-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
|
||||
overflow: visible;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.search-engine-selector {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
padding: 10px 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
transition: background 0.3s ease;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.search-engine-selector:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.search-engine-selector img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
#global-search-input {
|
||||
flex: 1;
|
||||
padding: 12px 15px;
|
||||
border: none;
|
||||
outline: none;
|
||||
font-size: 16px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#global-search-btn {
|
||||
padding: 12px 24px;
|
||||
border: none;
|
||||
background: #333;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
transition: background 0.3s ease;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
#global-search-btn:hover {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
.search-engine-dropdown {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
margin-top: 8px;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
min-width: 180px;
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
.search-engine-dropdown.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.engine-option {
|
||||
padding: 12px 15px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
|
||||
.engine-option:hover {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.engine-option.active {
|
||||
background: #e8f0fe;
|
||||
color: #1a73e8;
|
||||
}
|
||||
|
||||
.engine-option img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Georgia', 'Times New Roman', 'STSong', serif;
|
||||
line-height: 1.8;
|
||||
|
||||
Reference in New Issue
Block a user