临时

/* 代码块容器基础样式 */
.code-toolbar {
    position: relative;
    margin: 1em 0;
    background: #282c34;
    border-radius: 6px;
    padding-top: 40px;
    box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;
}
/* 工具栏显示控制 */
.code-toolbar:hover .toolbar {
    opacity: 1;
}
/* 代码块基础样式 */
.code-toolbar pre {
    margin: 0 !important;
    border-radius: 6px;
}
/* 自定义滚动条 */
.code-toolbar pre::-webkit-scrollbar {
    height: 8px;
    background-color: #282c34;
}
.code-toolbar pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}
.code-toolbar pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
/* 代码内容间距调整 */
.code-toolbar pre code {
    padding: 0 10px 0 5px;
}
/* 行号样式 */
.linenums li {
    padding: 0 !important;
}
/* Mac风格顶部栏 */
.code-toolbar:before {
    content: '';
    height: 40px;
    width: 100%;
    background: #21252b;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}
/* Mac风格按钮 */
.code-toolbar:after {
    content: '';
    position: absolute;
    top: 12px;
    left: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 25px 0 0 #ffbd2e, 50px 0 0 #27c93f;
    z-index: 1;
}
/* 复制按钮 */
.toolbar {
    position: absolute;
    top: 6px;
    right: 10px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}
/* 移动端适配 */
@media (max-width: 768px) {
    .toolbar {
        opacity: 1;
        display: block !important;
        pointer-events: auto !important;
    }
    
    .wp-block-jetpack-markdown .code-toolbar .toolbar {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .toolbar-item button {
        display: block !important;
        pointer-events: auto !important;
    }
}
/* 复制按钮样式 */
.toolbar-item button {
    padding: 5px 10px;
    color: #ccc;
    cursor: pointer;
    background: #0e78f9;
    border-radius: 3px;
    line-height: 1.4;
}
温馨提示:本站提供的一切软件、教程和内容信息都来自网络收集整理,仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负,版权争议与本站无关。用户必须在下载后的24个小时之内,从您的电脑或手机中彻底删除上述内容。如果您喜欢该程序和内容,请支持正版,购买注册,得到更好的正版服务。我们非常重视版权问题,如有侵权请邮件与我们联系处理。敬请谅解!

给TA打赏
共{{data.count}}人
人已打赏
未分类

临时

2025-9-8 14:13:57

未分类

临时

2025-9-8 14:13:57

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索