用户:Salt lovely/Vector.scss:修订间差异

添加836字节 、​ 2021年4月5日 (星期一)
修改代码结构,适配vector的变化
(.)
(修改代码结构,适配vector的变化)
<pre>$topbar-height: 1.5rem; // 顶栏高度
$topbar-padding: 0.5rem; // 顶栏高度
$top-gap: 0.5rem; // 主体与顶栏的间隙
"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;
padding: 0;
position: relative;
background-image: none;
font-size: 1rem;
line-height: 1.3rem;
}
}
/* 最顶部的信息栏 */
// 背景
#p-personal {
body {
width: 100%;
background: var(--themeimg) 0 0 no-repeat;
background-position: centerfixed;
background-attachmenttop: fixed0;
background-sizeright: cover0;
border-topheight: none$topbar-height;
padding: $topbar-padding $topbar-padding * 2;
font-family: var(--fontfamily);
background: url(https://www.mcbbs.net/template/mcbbs/image/top_bg.png);
* {
borderbackground-colorsize: var(--linecolor)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);
#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} + 1rem5rem);
overflow: visible;
position: relative;
$bookborder-right right top repeat-y;
background-color: var(--bgcolor);
min-height: 500px;
@include noboder();
&::after,
}
}
/* 页脚 */
// 顶部栏
#footer {
$head-right-offet: 12px; // 右侧导航栏偏移量
padding-bottom: 0;
#mw-head {
margin-top: $content-topbookborder;
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 {
opacity: 1;/*鼠标滑过,背景变白*/
transition-delaybackground: 0srgba(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 {
position: relative;
}
}
/* 适配 */
// 页脚
@media screen and (max-width: 982px) {
#footer {
padding#mw-bottom:panel 0;{
// margin-top left: 35px0;
}
transition: all 0.3s;
&:hover#content {
margin-left: 10rem;
background: rgba(255, 255, 255, 0.7); /*鼠标滑过,背景变白*/
margin-right: 0;
}
}
border: 1px solid var(--linecolor);
}
</pre>