🎨 滚动条样式调整

This commit is contained in:
ronger 2021-01-06 16:09:43 +08:00
parent ef557e1d87
commit 56dcc63378

View File

@ -5,11 +5,11 @@
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import PcMainView from '~/components/layouts/pc/main.vue'; import PcMainView from '~/components/layouts/pc/main.vue';
import MobileMainView from '~/components/layouts/mobile/main.vue'; import MobileMainView from '~/components/layouts/mobile/main.vue';
export default Vue.extend({ export default Vue.extend({
name: 'App', name: 'App',
components: { components: {
PcMainView, PcMainView,
@ -23,53 +23,53 @@
return this.$store.state.global.isMobile return this.$store.state.global.isMobile
} }
} }
}) })
</script> </script>
<style> <style>
body { body {
margin: 0; margin: 0;
display: block; display: block;
overflow-wrap: break-word; overflow-wrap: break-word;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
background-color: rgb(246, 247, 248); background-color: rgb(246, 247, 248);
overflow-x: hidden; overflow-x: hidden;
} }
a, li { a, li {
text-decoration: none !important; text-decoration: none !important;
} }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a, .h1 a, .h2 a, .h3 a, .h4 a, .h5 a, .h6 a { h1 a, h2 a, h3 a, h4 a, h5 a, h6 a, .h1 a, .h2 a, .h3 a, .h4 a, .h5 a, .h6 a {
color: inherit; color: inherit;
} }
h4, .h4 { h4, .h4 {
font-size: 1.125rem; font-size: 1.125rem;
} }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
margin-bottom: 0.66em; margin-bottom: 0.66em;
font-family: inherit; font-family: inherit;
font-weight: 600; font-weight: 600;
line-height: 1.1; line-height: 1.1;
color: inherit; color: inherit;
} }
p { p {
word-wrap: break-word; word-wrap: break-word;
word-break: break-all; word-break: break-all;
overflow: hidden; overflow: hidden;
} }
.avatar-md { .avatar-md {
width: 2.5rem; width: 2.5rem;
height: 2.5rem; height: 2.5rem;
line-height: 2.5rem; line-height: 2.5rem;
font-size: 1rem; font-size: 1rem;
} }
.avatar { .avatar {
width: 2rem; width: 2rem;
height: 2rem; height: 2rem;
line-height: 2rem; line-height: 2rem;
@ -86,33 +86,33 @@
-moz-user-select: none; -moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none;
} }
.pt-5, .py-5 { .pt-5, .py-5 {
padding-top: 1.5rem !important; padding-top: 1.5rem !important;
} }
.text-default { .text-default {
color: #495057 !important; color: #495057 !important;
} }
.text-muted { .text-muted {
color: #9aa0ac !important; color: #9aa0ac !important;
} }
.d-block { .d-block {
display: block !important; display: block !important;
} }
.article-summary-md { .article-summary-md {
position: relative; position: relative;
line-height: 1.4em; line-height: 1.4em;
/* 3 times the line-height to show 3 lines */ /* 3 times the line-height to show 3 lines */
height: 4.2em; height: 4.2em;
overflow: hidden; overflow: hidden;
} }
.article-summary-md::after { .article-summary-md::after {
content: "..."; content: "...";
font-weight: bold; font-weight: bold;
position: absolute; position: absolute;
@ -120,17 +120,17 @@
right: 0; right: 0;
padding: 0 20px 1px 45px; padding: 0 20px 1px 45px;
/*background:url(http://newimg88.b0.upaiyun.com/newimg88/2014/09/ellipsis_bg.png) repeat-y;*/ /*background:url(http://newimg88.b0.upaiyun.com/newimg88/2014/09/ellipsis_bg.png) repeat-y;*/
} }
.article-summary-sd { .article-summary-sd {
position: relative; position: relative;
line-height: 1.4em; line-height: 1.4em;
/* 1 times the line-height to show 1 lines */ /* 1 times the line-height to show 1 lines */
height: 1.4em; height: 1.4em;
overflow: hidden; overflow: hidden;
} }
.article-summary-sd::after { .article-summary-sd::after {
content: "..."; content: "...";
font-weight: bold; font-weight: bold;
position: absolute; position: absolute;
@ -138,13 +138,13 @@
right: 0; right: 0;
padding: 0 20px 1px 45px; padding: 0 20px 1px 45px;
/*background:url(http://newimg88.b0.upaiyun.com/newimg88/2014/09/ellipsis_bg.png) repeat-y;*/ /*background:url(http://newimg88.b0.upaiyun.com/newimg88/2014/09/ellipsis_bg.png) repeat-y;*/
} }
.text-center { .text-center {
text-align: center !important; text-align: center !important;
} }
.wrapper { .wrapper {
max-width: 980px; max-width: 980px;
margin: 0 auto; margin: 0 auto;
display: block; display: block;
@ -152,35 +152,57 @@
padding-right: 1rem; padding-right: 1rem;
box-sizing: border-box; box-sizing: border-box;
float: none; float: none;
} }
.mr-3, .mx-3 { .mr-3, .mx-3 {
margin-right: 0.75rem !important; margin-right: 0.75rem !important;
} }
.navbar-brand-img { .navbar-brand-img {
height: 2rem; height: 2rem;
line-height: 2rem; line-height: 2rem;
vertical-align: bottom; vertical-align: bottom;
margin-right: .5rem; margin-right: .5rem;
width: auto; width: auto;
} }
.topic-brand-img { .topic-brand-img {
height: 4rem; height: 4rem;
line-height: 2rem; line-height: 2rem;
vertical-align: bottom; vertical-align: bottom;
margin-right: .5rem; margin-right: .5rem;
width: auto; width: auto;
} }
.text-left { .text-left {
text-align: left; text-align: left;
} }
.text-right { .text-right {
text-align: right; text-align: right;
} }
/* 设置滚动条的样式 */
::-webkit-scrollbar {
width: 1px;
}
/* 滚动槽 */
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 10px;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: rgba(0, 0, 0, 0.1);
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}
::-webkit-scrollbar-thumb:window-inactive {
background: rgba(255, 0, 0, 0.4);
}
</style> </style>