Rock CSS B2J
/* src/styles/childlinks.css */
/* 子链接样式 - 用于显示子页面链接 */
#childLinks,
#childLinks ul,
#childLinks li {
list-style: none;
display: flex;
align-items: center;
backdrop-filter: blur(20px) brightness(150%) saturate(160%); /* 毛玻璃效果 */
background-color: var(--background-blur8); /* 半透明白色背景 */
}
#childLinks {
padding-top: 10px;
flex-direction: column;
gap: 0px;
justify-content: center;
border-top: 1px solid var(--background-highlight);
margin: 25px 10px; /* 添加外边距 */
border-radius: 20px; /* 圆角 */
box-shadow: 0 0 10px 5px rgba(165, 170, 168, 0.253); /* 阴影效果 */
}
.no-content + #childLinks {
border: 0;
}
#childLinks ul {
padding: 0;
gap: 10px;
flex-wrap: wrap;
justify-content: center;
}
#childLinks li {
padding: 0;
background: var(--background-highlight);
border-radius: 12px;
}
#childLinks li a {
padding: 2px 12px;
background: var(--background-highlight);
border-radius: 12px;
transform: translateY(0);
transition:
transform 200ms ease,
background-color 200ms ease,
color 200ms ease;
}
#childLinks li a:hover {
background: var(--background-active);
color: var(--background-secondary);
text-decoration: none;
transform: translateY(-2px);
}
#childLinks.grid li a {
padding: 50px;
color: var(--text-primary);
}
#childLinks.grid li a:hover {
transform: translateY(-5px);
}
/* src/styles/externallinks.css */
/* 外部链接样式 - 修复图标显示问题 */
a[href^="https://"] {
position: relative; /* 添加相对定位 */
display: inline-flex;
align-items: center;
gap: 6px;
}
/* 新增:保证图标有足够空间 */
a[href^="https://"]:not(:has(img)) {
padding-right: 20px;
}
#content a[href^="https://"] {
padding-right: 6px;
}
a[href^="https://"]::after {
content: "";
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%); /* 垂直居中 */
background-color: currentcolor;
mask: url('data:image/svg+xml;utf8,');
-webkit-mask: url('data:image/svg+xml;utf8,');
width: 13.5px;
height: 13.5px;
display: inline-block;
z-index: 1; /* 确保在毛玻璃层上方 */
}
/* 修复图标在图片链接中的位置 */
a[href^="https://"]:has(img)::after {
position: absolute;
bottom: 5px;
right: 5px;
top: auto;
transform: none;
background-color: #fff;
border-radius: 3px;
padding: 2px;
box-shadow: 0 0 3px rgba(0,0,0,0.5);
}
/* src/styles/swagger.css */
/* Swagger UI 文档样式 */
#main .swagger-ui .scheme-container {
background: var(--background-secondary);
backdrop-filter: blur(20px) brightness(150%) saturate(160%); /* 毛玻璃效果 */
background-color: var(--background-blur8); /* 半透明白色背景 */
margin: 25px 10px; /* 添加外边距 */
border-radius: 20px; /* 圆角 */
box-shadow: 0 0 10px 5px rgba(165, 170, 168, 0.253); /* 阴影效果 */
}
#main .swagger-ui .opblock .opblock-section-header {
background: rgba(0, 0, 0, 0.2);
}
#main .swagger-ui section.models {
border: 1px solid var(--background-highlight);
}
#main .swagger-ui section.models .model-container,
#main .swagger-ui .opblock-body pre.microlight {
background: var(--background-secondary) !important;
}
#main .swagger-ui{
backdrop-filter: blur(50px) brightness(150%) saturate(160%); /* 毛玻璃效果 */
background-color: var(--background-blur8); /* 半透明白色背景 */
},
#main .swagger-ui .info li,
#main .swagger-ui .info p,
#main .swagger-ui .info table,
#main .swagger-ui .opblock-description-wrapper p,
#main .swagger-ui .opblock-external-docs-wrapper p,
#main .swagger-ui .opblock-title_normal p,
#main .swagger-ui .response-col_status,
#main .swagger-ui .response-col_links {
color: var(--text-primary);
}
#main .swagger-ui .opblock .opblock-summary-operation-id,
#main .swagger-ui .opblock .opblock-summary-path,
#main .swagger-ui .opblock .opblock-summary-path__deprecated,
#main .swagger-ui .btn,
#main .swagger-ui .model,
#main .swagger-ui .tab li,
#main .swagger-ui table thead tr td,
#main .swagger-ui table thead tr th,
#main .swagger-ui .parameter__type,
#main .swagger-ui .parameter__name,
#main .swagger-ui thead tr td.col_header,
#main .swagger-ui .model-title {
color: var(--text-heading);
}
#main .swagger-ui .model .property.primitive {
color: var(--text-menu);
}
#main .swagger-ui .prop-type {
color: var(--text-link);
}
#main .swagger-ui svg {
fill: var(--text-heading);
}
#main .swagger-ui .model-toggle::after {
filter: invert(100%);
}
#main .swagger-ui .btn {
border: 2px solid var(--text-heading);
transition: transform 200ms ease;
}
#main .swagger-ui .btn:hover {
transform: translateY(-5px);
}
#main .swagger-ui input[disabled],
#main .swagger-ui select[disabled],
#main .swagger-ui textarea[disabled],
#main .swagger-ui select {
background: rgba(0, 0, 0, 0.2);
color: var(--text-primary);
border: 2px solid rgba(0, 0, 0, 0.3);
appearance: auto;
}
#main .models > h4 {
margin: 5px 10px;
}
#main .swagger-ui .opblock-summary-control {
margin-right: 10px;
}
#main .swagger-ui .authorization__btn {
padding-left: 0;
}
.swagger-ui .info .title small {
top: 0;
padding: 4px 8px;
background: var(--background-highlight);
}
#main .swagger-ui .info .title {
display: flex;
align-items: center;
gap: 10px;
}
#main .swagger-ui .info .title small pre {
color: var(--text-heading);
min-width: 0;
border: 0;
background: none;
}
#main .swagger-ui .info .title > span {
display: flex;
align-items: center;
}
.swagger-ui .info .title small.version-stamp {
background: var(--background-highlight);
}
#main .swagger-ui h1,
#main .swagger-ui h2,
#main .swagger-ui h3,
#main .swagger-ui h4,
#main .swagger-ui h5,
#main .swagger-ui h6 {
border: 0;
}
#main .swagger-ui input[type=email],
#main .swagger-ui input[type=file],
#main .swagger-ui input[type=password],
#main .swagger-ui input[type=search],
#main .swagger-ui input[type=text],
#main .swagger-ui textarea {
background-color: var(--background-highlight);
border: 0;
}
/* src/styles/toc.css */
/* 目录样式 */
#toc-pane {
display: flex;
flex-direction: column;
height: fit-content;
position: sticky;
top: 0;
order: 3;
backdrop-filter: blur(20px) brightness(150%) saturate(160%); /* 毛玻璃效果 */
background-color: var(--background-blur8); /* 半透明白色背景 */
margin: 25px 10px; /* 添加外边距 */
border-radius: 20px; /* 圆角 */
box-shadow: 0 0 10px 5px rgba(165, 170, 168, 0.253); /* 阴影效果 */
padding: 25px; /* 内间隔 - 可根据需要调整数值 */
}
#toc-pane h3 {
text-transform: uppercase;
}
#toc {
position: relative;
height: fit-content;
margin: 0;
border-radius: 6px;
padding: 0 0 0 16px;
max-width: 250px;
}
#toc,
#toc ul {
list-style: none;
}
#toc ul {
padding-left: 16px;
}
#toc span {
text-overflow: ellipsis;
overflow: hidden;
display: inline-block;
}
#toc li a {
display: flex;
align-items: center;
color: var(--text-heading);
transition: color 200ms ease;
white-space: nowrap;
}
#toc li a:hover,
#toc li a.active {
color: var(--text-link);
text-decoration: none;
}
#toc li a::before {
content: "";
display: flex;
position: absolute;
width: 2px;
height: 16px;
background: transparent;
left: 0;
transition: background-color 200ms ease;
}
#toc li a.active::before {
background: var(--text-link);
}
#toc::before {
content: "";
display: block;
position: absolute;
left: 0px;
top: 4px;
width: 2px;
height: calc(100% - 8px);
background: var(--background-highlight);
}
#content h1 a.toc-anchor,
#content h2 a.toc-anchor,
#content h3 a.toc-anchor,
#content h4 a.toc-anchor,
#content h5 a.toc-anchor,
#content h6 a.toc-anchor {
margin-left: 10px;
}
@media (max-width: 1200px) {
#toc-pane {
display: none;
}
}
/* src/styles/navbar/header.css */
/* 网站头部样式 */
#site-header {
display: flex;
flex-direction: column;
gap: 20px;
/* backdrop-filter: blur(20px) brightness(150%) saturate(160%); 毛玻璃效果 */
background-color: rgba(255, 255, 255, 0); /* 半透明白色背景 */
margin: 25px 10px; /* 添加外边距 */
/*border-radius: 20px; 圆角 */
/*box-shadow: 0 0 10px 5px rgba(165, 170, 168, 0.253); 阴影效果 */
}
/* 网站头部链接样式 - Flex布局方案 */
#site-header > a {
/* 设置为Flex容器 */
display: flex;
/* 垂直居中对齐子元素 */
align-items: center;
/* 水平居中对齐子元素 */
justify-content: center;
/* 子元素之间间距10像素 */
gap: 10px;
/* 可选附加样式(根据需求添加) */
padding: 12px 16px; /* 内边距 */
text-decoration: none; /* 去除下划线 */
color: var(--text-heading); /* 文字颜色 */
font-weight: 500; /* 字体粗细 */
font-size: 25px;
transition: all 0.3s; /* 悬停动画效果 */
}
/* 悬停状态效果(可选) */
#site-header > a:hover {
color: var(--text-link); /* 悬停文字颜色 */
transform: scale(1.02); /* 轻微放大效果 */
}
/* 响应式调整(可选) */
@media (max-width: 768px) {
#site-header > a {
padding: 8px 12px; /* 小屏幕减少内边距 */
gap: 8px; /* 小屏幕减少间距 */
}
}
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 27px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--text-primary);
transition: 0.4s;
border-radius: 34px;
}
.slider::before {
position: absolute;
content: "";
height: 19px;
width: 19px;
left: 4px;
bottom: 4px;
background-color: white;
transition: 0.4s;
border-radius: 50%;
z-index: 2;
}
input:checked + .slider {
background-color: var(--background-highlight);
}
input:focus + .slider {
box-shadow: 0 0 1px var(--background-highlight);
}
input:checked + .slider:before {
transform: translateX(33px);
}
.theme-selection {
display: flex;
align-items: center;
justify-content: space-between;
}
.theme-selection.no-transition .slider,
.theme-selection.no-transition .slider::before,
.theme-selection.no-transition .dark-icon,
.theme-selection.no-transition .light-icon {
transition: none !important;
}
.theme-selection label {
position: relative;
}
.dark-icon,
.light-icon {
display: flex;
opacity: 0;
transition: opacity 400ms ease, color 400ms ease;
pointer-events: none;
position: absolute;
top: 0;
height: 100%;
width: 24px;
}
input:not(:checked) ~ .light-icon {
opacity: 1;
}
input:checked ~ .dark-icon {
opacity: 1;
}
.dark-icon {
left: 5px;
color: var(--text-primary);
}
.light-icon {
right: 5px;
color: var(--background-highlight);
}
.search-item {
display: flex;
align-items: center;
position: relative;
}
.search-input {
color: var(--text-primary);
background: var(--background-highlight);
outline: 0;
border: 0;
flex: 1;
padding: 5px 5px 5px 32px;
width: 200px;
border-radius: 6px;
}
.search-icon {
display: flex;
color: var(--text-primary);
position: absolute;
width: 20px;
left: 5px;
}
/* src/styles/navbar/navbar.css */
/* 导航栏样式 */
#navigation {
display: flex;
flex-direction: column;
padding: 25px;
gap: 10px;
background-color: rgba(255, 255, 255, 0);
margin: 0 auto;
}
#menu {
order: 1;
white-space: nowrap;
flex: 0;
user-select: none;
}
#menu > ul {
overflow-y: auto;
list-style: none;
padding-left: 0 !important;
margin: 0;
}
#menu ul {
overflow-y: hidden;
position: relative;
display: flex;
flex-direction: column;
list-style: none;
padding-left: 20px;
}
#menu li {
position: relative;
display: flex;
flex-direction: column;
list-style: none;
cursor: pointer;
max-width: 350px;
margin: 2px 0;
}
#menu li span {
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
}
#menu li .collapsible-label {
display: flex;
flex: 1;
align-items: center;
position: relative;
}
#menu li > ul {
transition: height 200ms ease;
overflow: hidden;
}
#menu li:not(.expanded) > ul {
height: 0 !important;
}
#menu li.expanded > ul {
height: auto !important;
}
#menu p {
display: flex;
margin: 0;
}
#menu li.item > a {
padding-left: 24px;
position: relative;
z-index: 1;
}
#menu a {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 5px;
color: var(--text-menu);
text-decoration: none;
border-radius: 6px;
border: 1px solid transparent;
flex: 1;
padding: 6px 8px;
font-weight: 400;
transition: all 200ms ease;
}
#menu a:hover {
border-color: var(--text-menu);
background: rgba(255,255,255,0.1);
}
#menu a.active {
background: var(--background-active);
color: var(--background-secondary);
font-weight: 700;
}
#menu li ul {
position: relative;
z-index: 1;
}
#menu li ul::before {
content: "";
display: flex;
position: absolute;
top: 5px;
bottom: 5px;
left: 10px;
width: 2px;
background: var(--background-highlight);
}
/* 折叠按钮样式 */
/* 折叠按钮样式 - 加大加亮版本 */
.collapse-button {
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 4px; /* 增加内边距 */
background: rgba(255, 255, 255, 0.1); /* 添加轻微背景 */
border-radius: 4px; /* 添加圆角 */
border: 1px solid var(--background-highlight); /* 添加边框 */
color: var(--text-menu);
transform: rotate(-90deg);
transition: all 200ms ease; /* 添加all过渡 */
width: 28px; /* 固定宽度 */
height: 28px; /* 固定高度 */
order: 2;
margin-left: auto;
}
.collapse-button:hover {
color: var(--text-primary);
background: rgba(255, 255, 255, 0.2); /* 悬停时背景更亮 */
border-color: var(--text-primary); /* 悬停时边框变色 */
}
.expanded > .collapsible-label > .collapse-button,
.expanded > a > .collapse-button {
transform: rotate(0deg);
}
.collapse-button svg {
width: 18px; /* 增大图标 */
height: 18px; /* 增大图标 */
transition: transform 200ms ease; /* 图标动画 */
}
/* 可选:添加点击效果 */
.collapse-button:active {
transform: rotate(-90deg) scale(0.95);
}
.expanded > .collapsible-label > .collapse-button:active,
.expanded > a > .collapse-button:active {
transform: rotate(0deg) scale(0.95);
}
/* 菜单链接文本 */
.menu-link-text {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
order: 1;
}
/* 新增:定位按钮样式 */
.menu-anchor-button {
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
margin-right: 6px;
color: transparent;
background-color: var(--background-highlight);
border-radius: 50%;
transition: all 200ms ease;
cursor: pointer;
font-size: 12px;
position: relative;
order: 0;
}
.menu-anchor-button::before {
content: "#";
position: absolute;
opacity: 0;
transition: opacity 200ms ease;
color: var(--text-primary);
}
#menu li:hover .menu-anchor-button {
background-color: var(--background-active);
}
#menu li:hover .menu-anchor-button::before {
opacity: 1;
}
.menu-anchor-button:active {
transform: scale(0.9);
}
/* 移动端适配 */
@media (max-width: 768px) {
.menu-anchor-button {
opacity: 1;
color: var(--text-menu);
background: transparent;
}
.menu-anchor-button::before {
opacity: 1;
}
}
/* src/styles/navbar/index.css */
/* src/styles/popouts/search.css */
/* 搜索弹出框样式 */
.search-results {
display: flex;
flex-direction: column;
position: fixed;
background: var(--background-highlight);
margin-top: 10px;
border-radius: 12px;
padding: 0;
overflow: hidden;
z-index: 5;
backdrop-filter: blur(20px) brightness(150%) saturate(160%); /* 毛玻璃效果 */
background-color: var(--background-blur8); /* 半透明白色背景 */
margin: 25px 10px; /* 添加外边距 */
border-radius: 20px; /* 圆角 */
box-shadow: 0 0 10px 5px rgba(165, 170, 168, 0.253); /* 阴影效果 */
}
.search-result-item {
display: flex;
flex-direction: column;
padding: 4px 12px;
color: var(--text-primary);
}
.search-result-item:hover {
cursor: pointer;
background: var(--background-active);
color: var(--text-menu-active);
text-decoration: none;
}
.search-result-item:hover .search-result-note {
color: var(--text-menu-active);
}
.search-result-note {
font-size: 12px;
color: var(--text-menu);
}
/* src/styles/popouts/index.css */
/* src/styles/layout.css */
/* 布局样式 */
body {
background: url(https://bing.img.run/rand.php) no-repeat center center fixed;
background-size: cover;
}
#split-pane {
display: flex;
flex-direction: row;
gap: 50px;
}
#left-pane {
display: flex;
width: calc((100vw - 900px) / 2);
min-width: fit-content;
height: calc(100vh);
background: var(--background-blur8); /* 半透明白色背景 */
border-right: 5px solid var(--background-highlight);
justify-content: flex-end;
position: sticky;
top: 0;
overflow-y: auto;
backdrop-filter: blur(20px) brightness(150%) saturate(160%); /* 毛玻璃效果 */
margin: 25px 10px; /* 添加外边距 */
border-radius: 20px; /* 圆角 */
box-shadow: 0 0 10px 5px rgba(165, 170, 168, 0.253); /* 阴影效果 */
}
#right-pane {
display: flex;
margin: 0 auto;
gap: 40px;
flex: 1;
padding-bottom: 500px;
padding-right: 50px;
}
#main {
order: 2;
max-width: 900px;
flex: 1;
backdrop-filter: blur(50px) brightness(150%) saturate(160%); /* 毛玻璃效果 */
background-color: var(--background-blur8); /* 半透明白色背景 */
margin: 25px 10px; /* 添加外边距 */
padding: 25px; /*内间隔*/
border-radius: 20px; /* 圆角 */
box-shadow: 0 0 10px 5px rgba(165, 170, 168, 0.253); /* 阴影效果 */
}
/* src/styles/content.css */
/* 内容区域样式 */
.ck-content code,
.ck-content pre {
color: var(--text-primary);
background-color: var(--background-blur8);
border: 1px solid var(--background-active);
border-radius: 6px;
white-space: pre;
backdrop-filter: blur(20px) brightness(150%) saturate(160%); /* 毛玻璃效果 */
background-color: var(--background-blur8); /* 半透明白色背景 */
}
.ck-content code {
padding: 2px 5px;
}
.ck-content pre code {
border: 0;
}
.ck-content pre {
overflow: auto;
}
#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6 {
color: var(--text-heading);
border-bottom: 1px solid var(--background-highlight);
padding-bottom: 5px;
}
#content img {
max-width: 100%;
height: auto;
border-radius: 20px;
box-shadow: 0 0 10px 5px rgba(165, 170, 168, 0.253);
object-fit: contain;
object-position: center; /* 图片居中 */
}
#content h1::before {
content: "🚀"; /* 在标题前添加 Emoji */
margin-right: 8px; /* 根据需要调整间距 */
font-size: 32px; /* 根据需要调整大小 */
vertical-align: middle; /* 垂直对齐 */
}
#content h2::before {
content: "#️⃣2️⃣"; /* 在标题前添加 Emoji */
margin-right: 8px; /* 根据需要调整间距 */
font-size: 24px; /* 根据需要调整大小 */
vertical-align: middle; /* 垂直对齐 */
}
#content h3::before {
content: "#️⃣3️⃣"; /* 在标题前添加 Emoji */
margin-right: 8px; /* 根据需要调整间距 */
font-size: 18.72px; /* 根据需要调整大小 */
vertical-align: middle; /* 垂直对齐 */
}
#content h4::before {
content: "#️⃣4️⃣"; /* 在标题前添加 Emoji */
margin-right: 8px; /* 根据需要调整间距 */
font-size: 16px; /* 根据需要调整大小 */
vertical-align: middle; /* 垂直对齐 */
}
/* src/styles/mobile.css */
/* 移动端响应式样式 */
#mobile-header {
display: none;
background: var(--background-blur8); /* 半透明白色背景 */
justify-content: space-between;
align-items: center;
padding: 6px 12px;
backdrop-filter: blur(20px) brightness(150%) saturate(160%); /* 毛玻璃效果 */
margin: 25px 10px; /* 添加外边距 */
border-radius: 20px; /* 圆角 */
box-shadow: 0 0 10px 5px rgba(165, 170, 168, 0.253); /* 阴影效果 */
}
#mobile-header a {
display: flex;
align-items: center;
gap: 5px;
}
#mobile-header a img {
max-width: 32px;
}
#mobile-header button {
color: var(--text-menu);
background: transparent;
margin: 0;
padding: 0;
border: 0;
outline: 0;
display: flex;
align-items: center;
cursor: pointer;
border-radius: 6px;
transform: rotate(0);
transition: background-color 200ms ease, transform 200ms ease;
}
@media (max-width: 48em) {
#right-pane,
#main {
width: 100%;
overflow: hidden;
padding: 0;
}
#main {
padding: 1rem;
}
#mobile-header {
display: flex;
}
#mobile-header button svg {
width: 32px;
height: 32px;
}
#left-pane {
position: fixed;
top: 0;
left: 0;
width: auto;
transform: translateX(-100%);
transition: transform 200ms ease;
z-index: 2;
}
.menu-open #left-pane {
transform: translateX(0);
}
body::before {
content: "";
display: block;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0);
pointer-events: none;
transition: background-color 200ms ease;
z-index: 1;
}
body.menu-open::before {
background: rgba(0, 0, 0, 0.6);
}
body.menu-open #show-menu-button {
background: var(--background-highlight);
transform: rotate(90deg);
}
}
/* src/styles/index.css */
/* 全局样式 */
* {
box-sizing: border-box;
}
:root {
--background-primary: #333333;
--background-secondary: #1F1F1F;
--background-highlight: #484848;
--background-active: #777777;
--background-blur8: rgba(20, 20, 20, 0.8);
--text-primary: #cccccc;
--text-heading: #cccccc;
--text-menu: #AAAAAA;
--text-link: #87CEFA;
--text-menu-active: #000000;
color-scheme: dark;
}
body.theme-light {
--background-primary: #FFFFFF;
--background-secondary: #F3F3F3;
--background-highlight: #DDDDDD;
--background-active: #777777;
--background-blur8: rgba(255, 255, 255, 0.8);
--text-primary: #000000;
--text-heading: #000000;
--text-menu: #333333;
--text-link: #0000ff;
color-scheme: light;
}
body {
background: url(https://bing.img.run/rand.php) no-repeat center center fixed;
background-size: cover;
font-family:
"Montserrat",
"Lucida Grande",
"Lucida Sans Unicode",
arial,
sans-serif;
line-height: 1.5;
color: var(--text-primary);
}
a {
color: var(--text-link);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}