Files
blurweb/content.css
2025-12-11 11:44:54 +08:00

208 lines
6.0 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* content.css - 注入到网页的样式 */
/* 模糊效果类 */
.blurtext-blurred {
filter: blur(var(--blur-intensity, 10px)) !important;
user-select: none !important;
pointer-events: auto !important;
cursor: pointer !important;
transition: filter 0.2s ease !important;
position: relative !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: 6px 12px !important;
border-radius: 6px !important;
font-size: 13px !important;
font-weight: 600 !important;
white-space: nowrap !important;
z-index: 2147483647 !important;
pointer-events: none !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
animation: blurtext-tooltipFadeIn 0.15s ease !important;
}
@keyframes blurtext-tooltipFadeIn {
from {
opacity: 0;
transform: translate(-50%, -50%) scale(0.9);
}
to {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
}
/* 文本选择模式包裹的元素悬停效果 */
.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;
}
/* 模糊模式提示 */
.blurtext-hint {
position: fixed !important;
top: 20px !important;
left: 50% !important;
transform: translateX(-50%) !important;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
color: white !important;
padding: 12px 24px !important;
border-radius: 24px !important;
font-size: 14px !important;
font-weight: 500 !important;
z-index: 9999999 !important;
box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4) !important;
animation: blurtext-slideDown 0.3s ease !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}
@keyframes blurtext-slideDown {
from {
opacity: 0;
transform: translateX(-50%) translateY(-10px);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}
/* 高亮效果(鼠标悬停在可模糊元素上) */
.blurtext-highlight {
outline: 2px dashed #667eea !important;
outline-offset: 2px !important;
background: rgba(102, 126, 234, 0.1) !important;
}
/* 文本选择模式的模糊按钮 */
.blurtext-blur-button {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
color: white !important;
padding: 10px 20px !important;
border-radius: 20px !important;
font-size: 14px !important;
font-weight: 500 !important;
cursor: pointer !important;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
animation: blurtext-buttonPop 0.2s ease !important;
user-select: none !important;
white-space: nowrap !important;
border: none !important;
transition: all 0.3s ease !important;
}
.blurtext-blur-button:hover {
transform: translateX(-50%) scale(1.05) !important;
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
}
.blurtext-blur-button:active {
transform: translateX(-50%) scale(0.95) !important;
}
@keyframes blurtext-buttonPop {
from {
opacity: 0;
transform: translateX(-50%) scale(0.8);
}
to {
opacity: 1;
transform: translateX(-50%) scale(1);
}
}
/* ========== 区域模式样式 ========== */
/* 绘制框(拖动时显示) */
.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;
}