feat(初步实现spoiler插件):

This commit is contained in:
anime
2024-12-30 16:11:32 +08:00
parent 9b80c149bf
commit 5ace2d1e40
4 changed files with 107 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
/* Spoiler text styles */
.spoiler-text {
color: transparent; /* 文字透明 */
background-color: #808080; /* 背景为黑色 */
border-color: #808080;
text-decoration-color: #808080;
text-emphasis-color: #808080;
border-radius: 8px;
filter: blur(1px); /* 初始模糊 */
--hide-transition: 0.3s ease-out;
transition: opacity var(--hide-transition),
filter var(--hide-transition);
}
.spoiler-text:hover {
color: inherit; /* 鼠标悬停时恢复文字颜色 */
background-color: inherit; /* 鼠标悬停时恢复背景颜色 */
border-color: inherit;
text-decoration-color: inherit;
text-emphasis-color: inherit;
opacity: 1; /* 鼠标悬停时恢复不透明度 */
filter: blur(0); /* 鼠标悬停时解除模糊 */
}