世界,您好!

欢迎使用 WordPress。这是您的第一篇文章。编辑或删除它,然后开始写作吧!

    .code-toolbar {
        position: relative;  /* 父容器使用相对定位 */
        margin: 1em 0;
        background: #282c34;
        border-radius: 6px;
        padding-top: 40px;
    }
    .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;
    }
    
      /* 红点 */
    .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 {
            position: absolute;
            top: 6px;
            right: 10px;
            z-index: 10; /* 提高层级 */
            opacity: 1;
            width: auto; /* 确保宽度自适应 */
            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;
    }
    
      /* 添加代码块阴影效果 */
    .code-toolbar {
        box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;
    }
    .content-hidden-info{
        /*padding:0 28px !important;*/
        background-image: url(https://mengblog-1305308047.cos.ap-guangzhou.myqcloud.com/202411221656120.png);
    }
15 条回复 A文章作者 M管理员
  1. 您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar

  2. 誓言

    😁😁😁😁😁

  3. 寻北

    😁😁😁😁😁😁😁😁😁😁😁😁

  4. 小燕子

    您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。

  5. 迷小龙

    冒泡

  6. 东广

    3

  7. 小困鲨

    1

  8. 北冰洋

    4

  9. 北冰洋

    你好

  10. 北冰洋

    1

  11. 昕渊

    1支持支持

  12. 相今

    😁😁😁😁

  13. 相今

    w za you hui lai l

  14. 相今

    a ?

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索