/* for block of numbers */ pre code td.hljs-ln-numbers { color: #9c9c9c; border-right: 0.5px solid #9c9c9c; vertical-align: top; padding-left: 0.5rem; padding-right: 0.8rem; border: none; text-align: right; } /* for block of code */ pre code td.hljs-ln-code { /* padding-left: 1rem; */ border: none; } pre { position: relative; } pre .btn { display: none; position: absolute; top: 0; right: 0; background: #333; color: #f5f5f5; border: none; outline: none !important; } pre .btn:hover { color: #fff } pre:hover .btn { display: block; } pre .btn-tip { display: none; position: absolute; top: 0px; right: 0; z-index: 9; padding: 6px 12px; background: #333; color: #f5f5f5; border: none; border-radius: 4px; } .btn { display: inline-block; padding: 6px 12px; margin-bottom: 0; font-size: 14px; font-weight: 400; line-height: 1.42857143; text-align: center; white-space: nowrap; vertical-align: middle; -ms-touch-action: manipulation; touch-action: manipulation; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-image: none; border: 1px solid transparent; border-radius: 4px; } /* 代码复制时全选但不能被看到 */ code ::selection { background-color: rgba(0, 0, 0, 0); }