1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
.copy_code{
z-index: 2;
transition: all .3s;
display: none;
position: absolute;
color: #ddd;
background-color: transparent;
right: 5px;
top: 9px;
font-size: 12px;
line-height: 12px;
padding: 3px 5px;
border: 1px solid;
border-radius: 4px;
}
pre code ul {
list-style: decimal;
margin: 0px 0px 0 35px !important;
padding: 0px;
font-size: 14px;
color: #F5F5F5;
border-left: 1px solid #696969;
}
pre code ul li {
list-style: decimal;
padding: 5px!important;
margin: 0 !important;
font-family: SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;
line-height: 14px;
word-break: break-all;
word-wrap: break-word;
}
pre code ul li:nth-of-type(even) {
color: inherit;
}
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
pre code::-webkit-scrollbar{
width: 5px;
height: 8px;
background-color: rgba(255,255,255,0);
}
/*定义滚动条轨道 内阴影+圆角*/
pre code::-webkit-scrollbar-track{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
background-color: rgba(255,255,255,0);
}
/*定义滑块 内阴影+圆角*/
pre code::-webkit-scrollbar-thumb{
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #555;
}
pre code::-webkit-scrollbar-corner {
/* background: transparent!important; */
}
pre code:-webkit-scrollbar {
/* width: 8px!important; */
height: 8px!important;
}
pre code::-webkit-scrollbar-thumb {
border-radius: 5px!important;
background-color: #777!important;
}
pre code::-webkit-scrollbar-track-piece {
background: #21252a!important
}
pre code::-webkit-scrollbar-thumb:hover {
background-color: #888!important
}
pre code::-webkit-scrollbar-thumb:active {
background-color: #999!important
}
pre,article pre{
max-height: calc(100vh - 250px);
overflow: auto;
padding: 0;
margin-left: 2px;
background: #161616;
min-height: 100%; position: relative; padding-top: 30px; overflow-y: hidden;
}
.btn-copy-code {
transition:all .3s;
opacity:0;
position:absolute;
color:#ddd;
background-color:transparent;
right:6px;
top:4px;
font-size:10px;
line-height:12px;
padding:3px 5px;
border:1px solid;
border-radius:4px
}
.btn-copy-code:hover {
color:#fff
}
pre:hover .btn-copy-code {
opacity:1
}
|