MCBBS Wiki欢迎您共同参与编辑!在参与编辑之前请先阅读Wiki方针。
如果在编辑的过程中遇到了什么问题,可以去讨论板提问。
为了您能够无阻碍地参与编辑 未验证/绑定过邮箱的用户,请尽快绑定/验证。
MCBBS Wiki GitHub群组已上线!
您可以在回声洞中发表吐槽!
服务器状态监控。点击进入
本站由MCBBS用户自行搭建,与MCBBS及东银河系漫游指南(北京)科技有限公司没有从属关系。点此了解 MCBBS Wiki 不是什么>>
用户:Salt lovely/Vector.scss:修订间差异
跳到导航
跳到搜索
Salt lovely(留言 | 贡献) 小 (.) |
小 (文本替换 - 替换“mcbbs-wiki.cn”为“mcbbs.wiki”) |
||
(未显示1个用户的2个中间版本) | |||
第32行: | 第32行: | ||
"DejaVu serif", "Source Han Serif", "Source Han Serif SC"; |
"DejaVu serif", "Source Han Serif", "Source Han Serif SC"; |
||
} |
} |
||
/* 背景 */ |
|||
// 左侧栏 |
|||
body { |
|||
background: var(--themeimg) 0 0 no-repeat; |
|||
background-position: center; |
|||
background-attachment: fixed; |
|||
background-size: cover; |
|||
border-top: none; |
|||
font-family: var(--fontfamily); |
|||
* { |
|||
border-color: var(--linecolor); |
|||
} |
|||
} |
|||
/* 左侧栏 */ |
|||
#mw-panel { |
#mw-panel { |
||
position: fixed; |
position: fixed; |
||
第72行: | 第84行: | ||
padding: 0; |
padding: 0; |
||
position: relative; |
position: relative; |
||
background-image: none; |
|||
font-size: 1rem; |
font-size: 1rem; |
||
line-height: 1.3rem; |
line-height: 1.3rem; |
||
第137行: | 第150行: | ||
} |
} |
||
} |
} |
||
/* 最顶部的信息栏 */ |
|||
// 背景 |
|||
#p-personal { |
|||
body { |
|||
width: 100%; |
|||
background: var(--themeimg) 0 0 no-repeat; |
|||
position: fixed; |
|||
top: 0; |
|||
right: 0; |
|||
height: $topbar-height; |
|||
padding: $topbar-padding $topbar-padding * 2; |
|||
font-family: var(--fontfamily); |
|||
background: url(https://www.mcbbs.net/template/mcbbs/image/top_bg.png); |
|||
* { |
|||
background-size: contain; |
|||
opacity: 0.5; |
|||
font-size: 1rem; |
|||
// transition: opacity 0.5s ease; |
|||
transition-duration: 0.3s; |
|||
transition-timing-function: ease; |
|||
transition-delay: 0.5s; |
|||
&:hover { |
|||
opacity: 1; |
|||
transition-delay: 0s; |
|||
} |
} |
||
ul { |
|||
// right: 0; |
|||
float: right; |
|||
li { |
|||
height: 1rem; |
|||
margin-top: 0; |
|||
margin-bottom: 0; |
|||
font-size: 0.9rem; |
|||
line-height: 1rem; |
|||
} |
|||
} |
|||
} |
|||
/* 顶部栏 */ |
|||
$head-right-offet: 12px; // 右侧导航栏偏移量 |
|||
#mw-head { |
|||
top: $content-top; |
|||
padding: 0 $content-bookborder * 1.5 - $head-right-offet 0 |
|||
$content-bookborder * 1.5; |
|||
width: calc(100% - #{$content-bookborder * 3 - $head-right-offet}); |
|||
#left-navigation, |
|||
#right-navigation { |
|||
margin-top: 0rem; |
|||
nav, |
|||
div, |
|||
ul, |
|||
span, |
|||
a { |
|||
background-image: none; |
|||
background-color: transparent; |
|||
} |
|||
li { |
|||
border-left: none; |
|||
border-right: none; |
|||
&:first-child { |
|||
border-left: 1px solid var(--linecolor); |
|||
} |
|||
&:last-child { |
|||
border-right: 1px solid var(--linecolor); |
|||
} |
|||
} |
|||
ul { |
|||
li { |
|||
height: 2.7rem; |
|||
background-image: linear-gradient( |
|||
0deg, |
|||
var(--linecolor) 0%, |
|||
var(--bgcolor) 20% |
|||
); |
|||
&:hover { |
|||
background-image: linear-gradient( |
|||
0deg, |
|||
var(--linecolor) 0%, |
|||
var(--bgcolor) 12% |
|||
); |
|||
} |
|||
a { |
|||
font-size: 0.875rem; |
|||
padding-top: 1rem; |
|||
text-align: center; |
|||
} |
|||
&.icon a { |
|||
padding-top: 2.5rem; |
|||
} |
|||
} |
|||
&.menu li { |
|||
background-image: linear-gradient( |
|||
0deg, |
|||
var(--linecolor) 0%, |
|||
var(--bgcolor) 12% |
|||
); |
|||
&:hover { |
|||
background-image: linear-gradient( |
|||
0deg, |
|||
var(--linecolor) 0%, |
|||
var(--bgcolor) 6% |
|||
); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
#p-cactions .menu li { |
|||
border: 1px solid var(--linecolor); |
|||
background-color: var(--lightcolor); |
|||
} |
|||
} |
|||
#p-personal #pt-notifications-alert, |
|||
#p-personal #pt-notifications-notice { |
|||
margin-right: 0; |
|||
} |
} |
||
/ |
/* 主体 */ |
||
$bookborder-lefttop: url(https://s2.ax1x.com/2019/11/28/QFB2X4.png); |
$bookborder-lefttop: url(https://s2.ax1x.com/2019/11/28/QFB2X4.png); |
||
$bookborder-top: url(https://s2.ax1x.com/2019/11/28/QFBc1U.png); |
$bookborder-top: url(https://s2.ax1x.com/2019/11/28/QFBc1U.png); |
||
$bookborder-righttop: url(https://mcbbs |
$bookborder-righttop: url(https://mcbbs.wiki/images/c/cf/body_top-right.png); |
||
$bookborder-left: url(https://www.mcbbs.net/template/mcbbs/image/bg_border_left.png); // 左侧图片 |
$bookborder-left: url(https://www.mcbbs.net/template/mcbbs/image/bg_border_left.png); // 左侧图片 |
||
$bookborder-right: url(https://mcbbs |
$bookborder-right: url(https://mcbbs.wiki/images/1/13/bg_border_right.png); // 右侧图片 |
||
$bookborder-leftbottom: url(https://s2.ax1x.com/2019/11/28/QFcINd.png); |
$bookborder-leftbottom: url(https://s2.ax1x.com/2019/11/28/QFcINd.png); |
||
$bookborder-bottom: url(https://s2.ax1x.com/2019/11/28/QFco4A.png); |
$bookborder-bottom: url(https://s2.ax1x.com/2019/11/28/QFco4A.png); |
||
$bookborder-rightbottom: url(https://mcbbs |
$bookborder-rightbottom: url(https://mcbbs.wiki/images/e/e9/body_bottom-right.png); |
||
#content { |
#content { |
||
top: $content-top; |
top: $content-top; |
||
min-height: 400px; |
|||
padding: 1px $content-bookborder * 1.5; |
padding: 1px $content-bookborder * 1.5; |
||
margin-left: 11rem; |
|||
margin-right: 0.5rem; |
margin-right: 0.5rem; |
||
margin-bottom: calc(#{$content-bookborder * 2} + |
margin-bottom: calc(#{$content-bookborder * 2} + 5rem); |
||
overflow: visible; |
overflow: visible; |
||
position: relative; |
position: relative; |
||
第172行: | 第284行: | ||
$bookborder-right right top repeat-y; |
$bookborder-right right top repeat-y; |
||
background-color: var(--bgcolor); |
background-color: var(--bgcolor); |
||
min-height: 500px; |
|||
@include noboder(); |
@include noboder(); |
||
&::after, |
&::after, |
||
第199行: | 第310行: | ||
} |
} |
||
} |
} |
||
/* 页脚 */ |
|||
// 顶部栏 |
|||
#footer { |
|||
$head-right-offet: 12px; // 右侧导航栏偏移量 |
|||
padding-bottom: 0; |
|||
#mw-head { |
|||
top: $content- |
margin-top: $content-bookborder; |
||
clear: both; |
|||
padding: 0 $content-bookborder * 1.5 - $head-right-offet 0 |
|||
transition: all 0.3s; |
|||
$content-bookborder * 1.5; |
|||
width: calc(100% - #{$content-bookborder * 3 - $head-right-offet}); |
|||
#left-navigation, |
|||
#right-navigation { |
|||
margin-top: 0rem; |
|||
div, |
|||
ul, |
|||
span { |
|||
background-image: none; |
|||
background-color: transparent; |
|||
} |
|||
li { |
|||
border-left: none; |
|||
border-right: none; |
|||
&:first-child { |
|||
border-left: 1px solid var(--linecolor); |
|||
} |
|||
&:last-child { |
|||
border-right: 1px solid var(--linecolor); |
|||
} |
|||
} |
|||
ul li { |
|||
background-image: linear-gradient( |
|||
0deg, |
|||
var(--linecolor) 0%, |
|||
var(--bgcolor) 20% |
|||
); |
|||
&:hover { |
|||
background-image: linear-gradient( |
|||
0deg, |
|||
var(--linecolor) 0%, |
|||
var(--bgcolor) 12% |
|||
); |
|||
} |
|||
a { |
|||
font-size: 0.875rem; |
|||
padding-top: 1rem; |
|||
} |
|||
&.icon a { |
|||
padding-top: 2.5rem; |
|||
} |
|||
} |
|||
} |
|||
#p-cactions .menu li { |
|||
border: 1px solid var(--linecolor); |
|||
background-color: var(--lightcolor); |
|||
} |
|||
} |
|||
#p-personal #pt-notifications-alert, |
|||
#p-personal #pt-notifications-notice { |
|||
margin-right: 0; |
|||
} |
|||
// 最顶部的信息栏 |
|||
#p-personal { |
|||
width: 100%; |
|||
position: fixed; |
|||
top: 0; |
|||
right: 0; |
|||
height: $topbar-height; |
|||
padding: $topbar-padding $topbar-padding * 2; |
|||
background: url(https://www.mcbbs.net/template/mcbbs/image/top_bg.png); |
|||
background-size: contain; |
|||
opacity: 0.5; |
|||
font-size: 1rem; |
|||
// transition: opacity 0.5s ease; |
|||
transition-duration: 0.3s; |
|||
transition-timing-function: ease; |
|||
transition-delay: 0.5s; |
|||
&:hover { |
&:hover { |
||
/*鼠标滑过,背景变白*/ |
|||
background: rgba(255, 255, 255, 0.7); |
|||
} |
|||
ul { |
|||
// right: 0; |
|||
float: right; |
|||
li { |
|||
height: 1rem; |
|||
margin-top: 0; |
|||
margin-bottom: 0; |
|||
font-size: 0.9rem; |
|||
line-height: 1rem; |
|||
} |
|||
} |
|||
} |
|||
// 适配 |
|||
@media screen and (max-width: 982px) { |
|||
#mw-panel { |
|||
left: 0; |
|||
} |
} |
||
} |
} |
||
/ |
/* 滚动公告 */ |
||
.topsign { |
.topsign { |
||
position: relative; |
position: relative; |
||
第312行: | 第339行: | ||
} |
} |
||
} |
} |
||
/* 适配 */ |
|||
// 页脚 |
|||
@media screen and (max-width: 982px) { |
|||
#footer { |
|||
#mw-panel { |
|||
left: 0; |
|||
} |
|||
transition: all 0.3s; |
|||
#content { |
|||
margin-left: 10rem; |
|||
background: rgba(255, 255, 255, 0.7); /*鼠标滑过,背景变白*/ |
|||
margin-right: 0; |
|||
} |
} |
||
} |
} |
2022年11月22日 (二) 07:43的最新版本
$topbar-height: 1.5rem; // 顶栏高度 $topbar-padding: 0.5rem; // 顶栏高度 $top-gap: 0.5rem; // 主体与顶栏的间隙 $top-height: $topbar-height + $topbar-padding * 2; // 顶部高度 $content-bookborder: 46px; // 四周书页图片宽度 $content-top: calc( #{$content-bookborder} + #{$top-height + $top-gap} ); // 主体部分高度(顶部+书页背景顶部边框) /* 源代码: 用户:Salt_lovely/Vector.scss */ // 无边框 @mixin noboder { border: none; border-width: 0; } :root { --themecolor: #a8cdff; --themeimg: url(https://www.mcbbs.net/template/mcbbs/image/body_bg.jpg); --bgtop: 46px; --bgleft: 20px; --lightcolor: #fdf6e6; --bgcolor: #fbf2dc; --bgcolor1: #e9d3ad; --bgcolor2: #e7d3b1; --bgcolor3: #e9cb97; --linecolor: #cfb78e; --fontfamily: sans-serif, "Microsoft Yahei", apple color emoji, segoe ui emoji, segoe ui symbol; --fontfamily2: "Linux Libertine", "Georgia", "Times", serif, sans-serif, Tahoma; --articlefont: Lora, "Palatino Linotype", "Book Antiqua", "New York", "DejaVu serif", "Source Han Serif", "Source Han Serif SC"; } /* 背景 */ body { background: var(--themeimg) 0 0 no-repeat; background-position: center; background-attachment: fixed; background-size: cover; border-top: none; font-family: var(--fontfamily); * { border-color: var(--linecolor); } } /* 左侧栏 */ #mw-panel { position: fixed; width: 8rem; left: 0.5rem; top: 3rem; padding: 0 1rem 0.5rem 1rem; background-color: #fff9; border: 1px solid #ccc; border-radius: 4px; #p-logo { width: 10rem; height: 10rem; margin-top: -14px; margin-left: -1rem; a { background-size: contain; } + .portal { margin-top: 0; .body { margin-left: 0; } } } .portal { padding: 0.75rem 0 0 0; margin: 0; &:hover { background-color: transparent; } > h1, > h2, > h3, > h4, > h5, > h6 { margin: 0; padding: 0; position: relative; background-image: none; font-size: 1rem; line-height: 1.3rem; cursor: pointer; &::after { position: absolute; bottom: 0; right: 0; opacity: 0; font-size: 0.75rem; line-height: 1.3rem; transition: 0.3s ease; } &:hover::after { opacity: 0.9; } } .body { padding-top: 0; margin-left: 0; border-top: 2px solid var(--linecolor) !important; background-image: none; transition: max-height 0.3s ease; overflow: hidden; li { padding: 0; font-size: 0.9rem; line-height: 1.2rem; a { width: 100%; display: inline-block; } } } &.salt-close { > h1, > h2, > h3, > h4, > h5, > h6 { &::after { content: "点击展开"; } } .body { max-height: 0px; } } &.salt-open { > h1, > h2, > h3, > h4, > h5, > h6 { &::after { content: "点击收起"; } } .body { max-height: var(--salt-open-height, 100vh); } } } } /* 最顶部的信息栏 */ #p-personal { width: 100%; position: fixed; top: 0; right: 0; height: $topbar-height; padding: $topbar-padding $topbar-padding * 2; background: url(https://www.mcbbs.net/template/mcbbs/image/top_bg.png); background-size: contain; opacity: 0.5; font-size: 1rem; // transition: opacity 0.5s ease; transition-duration: 0.3s; transition-timing-function: ease; transition-delay: 0.5s; &:hover { opacity: 1; transition-delay: 0s; } ul { // right: 0; float: right; li { height: 1rem; margin-top: 0; margin-bottom: 0; font-size: 0.9rem; line-height: 1rem; } } } /* 顶部栏 */ $head-right-offet: 12px; // 右侧导航栏偏移量 #mw-head { top: $content-top; padding: 0 $content-bookborder * 1.5 - $head-right-offet 0 $content-bookborder * 1.5; width: calc(100% - #{$content-bookborder * 3 - $head-right-offet}); #left-navigation, #right-navigation { margin-top: 0rem; nav, div, ul, span, a { background-image: none; background-color: transparent; } li { border-left: none; border-right: none; &:first-child { border-left: 1px solid var(--linecolor); } &:last-child { border-right: 1px solid var(--linecolor); } } ul { li { height: 2.7rem; background-image: linear-gradient( 0deg, var(--linecolor) 0%, var(--bgcolor) 20% ); &:hover { background-image: linear-gradient( 0deg, var(--linecolor) 0%, var(--bgcolor) 12% ); } a { font-size: 0.875rem; padding-top: 1rem; text-align: center; } &.icon a { padding-top: 2.5rem; } } &.menu li { background-image: linear-gradient( 0deg, var(--linecolor) 0%, var(--bgcolor) 12% ); &:hover { background-image: linear-gradient( 0deg, var(--linecolor) 0%, var(--bgcolor) 6% ); } } } } #p-cactions .menu li { border: 1px solid var(--linecolor); background-color: var(--lightcolor); } } #p-personal #pt-notifications-alert, #p-personal #pt-notifications-notice { margin-right: 0; } /* 主体 */ $bookborder-lefttop: url(https://s2.ax1x.com/2019/11/28/QFB2X4.png); $bookborder-top: url(https://s2.ax1x.com/2019/11/28/QFBc1U.png); $bookborder-righttop: url(https://mcbbs.wiki/images/c/cf/body_top-right.png); $bookborder-left: url(https://www.mcbbs.net/template/mcbbs/image/bg_border_left.png); // 左侧图片 $bookborder-right: url(https://mcbbs.wiki/images/1/13/bg_border_right.png); // 右侧图片 $bookborder-leftbottom: url(https://s2.ax1x.com/2019/11/28/QFcINd.png); $bookborder-bottom: url(https://s2.ax1x.com/2019/11/28/QFco4A.png); $bookborder-rightbottom: url(https://mcbbs.wiki/images/e/e9/body_bottom-right.png); #content { top: $content-top; min-height: 400px; padding: 1px $content-bookborder * 1.5; margin-left: 11rem; margin-right: 0.5rem; margin-bottom: calc(#{$content-bookborder * 2} + 5rem); overflow: visible; position: relative; background: $bookborder-left left top repeat-y, $bookborder-right right top repeat-y; background-color: var(--bgcolor); @include noboder(); &::after, &::before { content: ""; left: 0; height: $content-bookborder; width: calc(100% - #{$content-bookborder * 2}); padding: 0 $content-bookborder; display: block; position: absolute; } &::before { // 上边 top: -$content-bookborder; background: $bookborder-lefttop left top no-repeat, $bookborder-righttop right top no-repeat, $bookborder-top top repeat-x content-box; } &::after { // 下边 bottom: -$content-bookborder; background: $bookborder-leftbottom left bottom no-repeat, $bookborder-rightbottom right bottom no-repeat, $bookborder-bottom bottom repeat-x content-box; } } /* 页脚 */ #footer { padding-bottom: 0; margin-top: $content-bookborder; clear: both; transition: all 0.3s; &:hover { /*鼠标滑过,背景变白*/ background: rgba(255, 255, 255, 0.7); } } /* 滚动公告 */ .topsign { position: relative; width: 100%; height: 65px; overflow: hidden; .topsignitem { position: absolute; left: 0; top: 0; width: 100%; height: auto; p { line-height: 50px; text-align: center; } } } /* 适配 */ @media screen and (max-width: 982px) { #mw-panel { left: 0; } #content { margin-left: 10rem; margin-right: 0; } } // 杂项 #mw-page-base, #mw-head-base { background-color: transparent; opacity: 0; display: none; height: 0; } #catlinks, // 页面底部分类 pre, table.wikitable, li.gallerybox div.thumb, .toc, .mw-rcfilters-ui-changesListWrapperWidget .mw-changeslist-legend, // 最近更改列表说明 .mw-warning, .toccolours, table.navbox, #simpleSearch { background-color: var(--lightcolor); } fieldset, ul, li, a, span, em, pre, h1, h2, h3, h4, h5, h6 { border-color: var(--linecolor) !important; } h1, h2, h3, h4, h5, h6 { font-family: var(--fontfamily) !important; } #firstHeading { margin-top: var(--bgtop); } .diff-deletedline { border-color: #ffe49c !important; } .diff-addedline { border-color: #a3d3ff !important; } #catlinks { margin-bottom: 2px; } ::selection { background: lightblue; color: black; } ::-moz-selection { background: lightblue; color: black; } input, select { background-color: var(--lightcolor); border: 1px solid var(--linecolor); }