diff options
| author | BigCoke233 <hi@guhub.cn> | 2020-07-11 09:53:14 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2020-07-11 09:53:14 +0800 |
| commit | be75f1ab97dbc96923c50d13b08e89e26708ba99 (patch) | |
| tree | 70b79753869568b16f9fcc6b75f2c5607665c062 /assets/css/main/post.css | |
| parent | 4817b6ffa38af8b269e4ad91591d70c032dd8e5d (diff) | |
:zap: Perf: 用 css 实现锚链接平滑滚动,舍弃 js 控制 #62
Diffstat (limited to 'assets/css/main/post.css')
| -rw-r--r-- | assets/css/main/post.css | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/assets/css/main/post.css b/assets/css/main/post.css index 6a5728b..5dc5a95 100644 --- a/assets/css/main/post.css +++ b/assets/css/main/post.css @@ -161,6 +161,13 @@ border-left: 6px solid #4D90FE;
padding-left: 10px;
}
+.post-content h1,
+.post-content h2,
+.post-content h3,
+.post-content h4,
+.post-content h5 {
+ scroll-margin-top: 5em
+}
.post-content hr {
display: block;
margin: 20px auto;
|
