关于暗黑模式代码块复制问题

css添加

/* 修复暗黑模式代码复制问题 */
.cnblogs-markdown pre {
  position: relative;
}
.cnblogs-markdown pre > span {
  position: absolute;
  top: 0;
  right: 0;
  border-radius: 3px;
  padding:0 10px;
  font-size: 12px;
  background: #fff;
  color: #000;
  cursor: pointer;
  display:none;
  margin:8px 10px;
  transition: background .5s;
  -moz-transition: background .5s;
  -webkit-transition: background .5s;
  -o-transition: background .5s;
}
.cnblogs-markdown pre > span:hover {
  background: #ddd
}
.cnblogs-markdown pre:hover > span {
  display:block;
}
/* 去除广告 */
#under_post_card1{
    display: none !important;
}
#under_post_card2{
    display: none !important;
}

页脚html添加

<script src="https://files.cnblogs.com/files/fenggwsx/clipboard.min.js"></script>
<script src="https://files.cnblogs.com/files/fenggwsx/cp.js"></script>
posted @ 2023-11-22 16:48  学不会xuebuhui  阅读(9)  评论(0编辑  收藏  举报
Language: javascript