refactor: 实现 Markdown 编辑器工具条吸顶效果
continuous-integration/drone/push Build is passing

This commit is contained in:
seahi committed 2026-09-16 09:52:20 +08:00
1 parent 3f33f8fe20
commit 2da03d6ddc
1 file changed
+8 -1
@@ -394,6 +394,9 @@
} }
.md-toolbar { .md-toolbar {
/* 吸顶:紧贴后台固定顶栏(高度 58px)下方,滚动时保持可见 */
position: sticky;
top: 58px;
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
@@ -401,7 +404,11 @@
margin-bottom: 10px; margin-bottom: 10px;
padding: 4px; padding: 4px;
border: 1px solid rgba(0, 0, 0, 0.12); border: 1px solid rgba(0, 0, 0, 0.12);
background-color: rgba(0, 0, 0, 0.015); /* 需要用不透明背景,否则滚动内容会从工具条后面透出来 */
background-color: var(--bg-color, #ffffff);
background-image: linear-gradient(rgba(0, 0, 0, 0.015), rgba(0, 0, 0, 0.015));
/* 用阴影填充下方 10px 的间距,避免滚动内容从缝隙中露出 */
box-shadow: 0 10px 0 var(--bg-color, #ffffff);
} }
.md-btn { .md-btn {