Skip to content

代碼隨想錄 by vi000246

Details

Authorvi000246

LicenseNo License

Categoryprogrammercarl

Created

Updated

Size2.0 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

test

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name         代碼隨想錄
@version      20241127.07.14
@namespace    https://userstyles.world/user/vi000246
@description  test
@author       vi000246
@license      No License
==/UserStyle== */

@-moz-document url-prefix("https://programmercarl.com/"), url-prefix("https://www.programmercarl.com/") {
#readmore-container {
    all: unset;
     max-width: 500px;
}
#readmore-wrapper{
    display:none !important;
}
.navbar{
    display:none;
}
p:has(img[src="/assets/img/1.40782437.jpg"]) {
    display: none;
}
.option-box:has(img[src*="wexin4.png"]) {
    display: none;
}
.option-box:has(img[src*="download.png"]) {
    display: none;
}
.option-box:has(img[src*="red-heart.png"]) {
    display: none;
}
body{
    font-size:18px;
     font-size: 1.1em; /* 比原始略大 */
    line-height: 1.2; /* 增加行高,讓字距更舒適 */
    font-weight: 800; /* 或視情況使用 500 */

}
/* 設定sidebar為隱藏狀態  把它移到最左邊*/
.page-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px; /* 側邊欄的寬度 */
    height: 100%;
    transform: translateX(-100%); /* 初始狀態隱藏 */
    transition: transform 0.3s ease; /* 滑出效果 */
}

/* 當滑鼠懸停到右側區域時顯示sidebar */
.page-sidebar:hover {
    transform: translateX(-80%); /* 顯示側邊欄 */
}

/* 增加觸發範圍 */
.page-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: -40px; /* 調整觸發區域的寬度 */
    width: 50px;
    height: 100%;
}

/* 初始隱藏程式碼,使用透明度控制 */
[class^="language-"] {
    opacity: 0.2; /* 默認時半透明 */
    transition: opacity 0.3s ease; /* 平滑過渡效果 */
}

/* 當滑鼠懸停在 parent 元素上時,顯示程式碼 */
[class^="language-"]:hover {
    opacity: 1; /* 滑鼠懸停時顯示完全不透明 */
}

/* 為程式碼區塊外層容器加上 hover 效果 */
[class^="language-"]:hover pre {
    opacity: 1;
}

}

Reviews

No reviews yet.