You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
846 B
34 lines
846 B
//代码块复制按钮 |
|
if hexo-config('style.body.highlight.copy_btn') |
|
.highlight |
|
//方便copy代码按钮(btn-copy)的定位 |
|
position: relative |
|
|
|
.btn-copy |
|
display: inline-block |
|
cursor: pointer |
|
border: none |
|
disable-user-select() |
|
-webkit-appearance: none |
|
font-family: Menlo, $fontfamily-code |
|
font-size: "calc(%s - 1px)" % $fontsize-code |
|
font-weight: bold |
|
padding: $gap * 0.25 $gap * 0.5 |
|
>i |
|
margin-right: 4px |
|
color: $color-meta |
|
background: $color-card |
|
border-bottom-left-radius: $border-codeblock |
|
border-top-right-radius: $border-codeblock |
|
box-shadow: $boxshadow-card |
|
position: absolute |
|
top: 0 |
|
right: 0 |
|
opacity: 0 |
|
trans() |
|
&:hover |
|
color: $color-hover |
|
background: bgcolor($color-hover) |
|
|
|
.highlight:hover .btn-copy |
|
opacity: 1
|
|
|