From ef5654dcb77093ae8ead57ce1b402f502c663b5d Mon Sep 17 00:00:00 2001 From: jmal Date: Sun, 25 Oct 2020 20:58:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E7=95=8C=E9=9D=A2=E5=86=85=E5=AE=B9=E5=92=8C?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/markdown.scss | 28 ++++++++++++++++++++++++++-- src/views/public/article/index.vue | 6 ++---- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/styles/markdown.scss b/src/styles/markdown.scss index 05cdf86..b1fefb5 100644 --- a/src/styles/markdown.scss +++ b/src/styles/markdown.scss @@ -346,14 +346,38 @@ /deep/ .slimScrollDiv { width: 240px; } + /deep/ .slimScrollDiv { + transform: translateX(50px); + } + /deep/ .el-main { + transform: translateX(50px); + } +} + +@media only screen and (min-width: 1240px){ + /deep/ .slimScrollDiv { + transform: translateX(80px); + } + /deep/ .el-main { + transform: translateX(80px); + } +} + +@media only screen and (min-width: 1400px){ + /deep/ .slimScrollDiv { + transform: translateX(120px); + } + /deep/ .el-main { + transform: translateX(120px); + } } @media only screen and (min-width: 1920px){ /deep/ .right-bj { - width: 285px; + width: 240px; } /deep/ .slimScrollDiv { - width: 285px; + width: 240px; } } diff --git a/src/views/public/article/index.vue b/src/views/public/article/index.vue index 88523f5..a176510 100644 --- a/src/views/public/article/index.vue +++ b/src/views/public/article/index.vue @@ -56,9 +56,8 @@ defaultOpen="preview" /> -
- +
@@ -219,8 +218,7 @@ var scrollTop = $(this).scrollTop(); var scrollHeight = $(document).height(); var windowHeight = $(this).height(); - - var progress = (afterScrollTop/scrollHeight) * 100 + var progress = ((afterScrollTop + document.body.clientHeight)/scrollHeight) * 100 // 改变top bar 进度条 document.querySelector(".scrollbar").style.width = progress +'%'