添加区域模式,优化提示
This commit is contained in:
138
content.css
138
content.css
@@ -10,59 +10,30 @@
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
/* 元素模式下的悬停效果 */
|
||||
body.blurtext-mode .blurtext-blurred:hover::after {
|
||||
content: '点击取消模糊' !important;
|
||||
position: absolute !important;
|
||||
top: 50% !important;
|
||||
left: 50% !important;
|
||||
transform: translate(-50%, -50%) !important;
|
||||
/* 元素模式下的悬停效果 - 移除伪元素方案,改用 JS 动态创建 */
|
||||
/* body.blurtext-mode .blurtext-blurred:hover::after 已移除 */
|
||||
|
||||
/* 元素模式悬停提示工具栏(JS 动态创建) */
|
||||
.blurtext-element-tooltip {
|
||||
position: fixed !important;
|
||||
background: rgba(102, 126, 234, 0.95) !important;
|
||||
color: white !important;
|
||||
padding: 4px 8px !important;
|
||||
border-radius: 4px !important;
|
||||
font-size: 12px !important;
|
||||
white-space: nowrap !important;
|
||||
z-index: 999999 !important;
|
||||
pointer-events: none !important;
|
||||
filter: none !important;
|
||||
}
|
||||
|
||||
/* 文本选择模式包裹的元素悬停效果 */
|
||||
.blurtext-selection-wrapped {
|
||||
transition: all 0.1s ease !important;
|
||||
}
|
||||
|
||||
.blurtext-selection-wrapped:hover {
|
||||
background-color: rgba(102, 126, 234, 0.2) !important;
|
||||
outline: 2px solid rgba(102, 126, 234, 0.5) !important;
|
||||
outline-offset: 2px !important;
|
||||
}
|
||||
|
||||
.blurtext-selection-wrapped:hover::after {
|
||||
content: '🔓 点击恢复' !important;
|
||||
position: absolute !important;
|
||||
top: 50% !important;
|
||||
left: 50% !important;
|
||||
transform: translate(-50%, -50%) !important;
|
||||
background: rgba(102, 126, 234, 0.98) !important;
|
||||
color: white !important;
|
||||
padding: 6px 12px !important;
|
||||
border-radius: 6px !important;
|
||||
font-size: 13px !important;
|
||||
font-weight: 600 !important;
|
||||
white-space: nowrap !important;
|
||||
z-index: 999999 !important;
|
||||
z-index: 2147483647 !important;
|
||||
pointer-events: none !important;
|
||||
filter: none !important;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
|
||||
animation: blurtext-tooltipPop 0.15s ease !important;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
|
||||
animation: blurtext-tooltipFadeIn 0.15s ease !important;
|
||||
}
|
||||
|
||||
@keyframes blurtext-tooltipPop {
|
||||
@keyframes blurtext-tooltipFadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translate(-50%, -50%) scale(0.8);
|
||||
transform: translate(-50%, -50%) scale(0.9);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
@@ -70,6 +41,42 @@ body.blurtext-mode .blurtext-blurred:hover::after {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 文本选择模式包裹的元素悬停效果 */
|
||||
.blurtext-selection-wrapped {
|
||||
display: inline !important;
|
||||
position: relative !important;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
/* 移除伪元素提示,改用 JS 动态创建(避免被模糊效果影响) */
|
||||
|
||||
/* 文本选择错误提示(显示在选区下方) */
|
||||
.blurtext-selection-error {
|
||||
background: #f44336 !important;
|
||||
color: white !important;
|
||||
padding: 8px 16px !important;
|
||||
border-radius: 6px !important;
|
||||
font-size: 13px !important;
|
||||
font-weight: 500 !important;
|
||||
box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4) !important;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
|
||||
animation: blurtext-errorPop 0.2s ease !important;
|
||||
pointer-events: none !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
@keyframes blurtext-errorPop {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateX(-50%) translateY(-5px) scale(0.9);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateX(-50%) translateY(0) scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* 模糊模式下的鼠标样式 */
|
||||
body.blurtext-mode * {
|
||||
cursor: crosshair !important;
|
||||
@@ -149,7 +156,52 @@ body.blurtext-mode * {
|
||||
}
|
||||
}
|
||||
|
||||
/* 文本选择模式包裹的元素 */
|
||||
.blurtext-selection-wrapped {
|
||||
display: inline !important;
|
||||
/* ========== 区域模式样式 ========== */
|
||||
|
||||
/* 绘制框(拖动时显示) */
|
||||
.blurtext-drawing-box {
|
||||
border: 2px dashed #667eea !important;
|
||||
background: rgba(102, 126, 234, 0.1) !important;
|
||||
pointer-events: none !important;
|
||||
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
|
||||
}
|
||||
|
||||
/* 区域覆盖层 */
|
||||
.blurtext-area-overlay {
|
||||
background: rgba(255, 255, 255, 0.1) !important;
|
||||
backdrop-filter: blur(var(--blur-intensity, 10px)) !important;
|
||||
-webkit-backdrop-filter: blur(var(--blur-intensity, 10px)) !important;
|
||||
border: none !important;
|
||||
box-sizing: border-box !important;
|
||||
transition: all 0.2s ease !important;
|
||||
user-select: none !important;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
|
||||
.blurtext-area-overlay:hover {
|
||||
outline: 2px solid rgba(102, 126, 234, 0.5) !important;
|
||||
outline-offset: -2px !important;
|
||||
background: rgba(255, 255, 255, 0.15) !important;
|
||||
}
|
||||
|
||||
/* 区域覆盖层悬停提示 */
|
||||
.blurtext-area-overlay:hover::after {
|
||||
content: '点击恢复此区域' !important;
|
||||
position: absolute !important;
|
||||
top: 50% !important;
|
||||
left: 50% !important;
|
||||
transform: translate(-50%, -50%) !important;
|
||||
background: rgba(102, 126, 234, 0.95) !important;
|
||||
color: white !important;
|
||||
padding: 6px 12px !important;
|
||||
border-radius: 6px !important;
|
||||
font-size: 13px !important;
|
||||
font-weight: 600 !important;
|
||||
white-space: nowrap !important;
|
||||
z-index: 999999 !important;
|
||||
pointer-events: none !important;
|
||||
backdrop-filter: none !important;
|
||||
-webkit-backdrop-filter: none !important;
|
||||
filter: none !important;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user