MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| (未显示同一用户的7个中间版本) | |||
| 第1行: | 第1行: | ||
/* 这里放置的CSS将应用于所有皮肤 */ | /* 这里放置的CSS将应用于所有皮肤 */ | ||
/* | /* USERNAME */ | ||
$( function() { | |||
if ( mw.user.isNamed() ) { | |||
$( '.insertusername' ).text( mw.user.getName() ); | |||
} else { | |||
$( '.insertusername' ).text( '访客' ); | |||
} | |||
} ); | |||
. | |||
. | |||
} | |||
. | |||
. | |||
} | |||
} | |||
/* | /* --- Bookshelf Component Styles --- */ | ||
/* 组件的顶级包裹器,用于限定所有样式的范围 */ | |||
.bookshelf-component-wrapper { | .bookshelf-component-wrapper { | ||
/* 可以在这里添加组件外围的边距等 */ | |||
} | } | ||
/* 书架容器 */ | |||
.bookshelf-component-wrapper .bookshelf { | .bookshelf-component-wrapper .bookshelf { | ||
display: flex | display: flex; | ||
align-items: flex-end | align-items: flex-end; | ||
gap: 10px | gap: 10px; | ||
width: 80vw | width: 80vw; | ||
max-width: 900px | max-width: 900px; | ||
padding: 20px 20px 15px 20px | padding: 20px 20px 15px 20px; /* 底部增加padding以容纳滑动条(即使隐藏) */ | ||
border-bottom: 10px solid #8d6e63 | border-bottom: 10px solid #8d6e63; | ||
box-sizing: border-box | box-sizing: border-box; | ||
overflow-x: auto | overflow-x: auto; | ||
-ms-overflow-style: none | -ms-overflow-style: none; /* IE/Edge */ | ||
scrollbar-width: none | scrollbar-width: none; /* Firefox */ | ||
} | } | ||
.bookshelf-component-wrapper .bookshelf::-webkit-scrollbar { | .bookshelf-component-wrapper .bookshelf::-webkit-scrollbar { | ||
display: none | display: none; /* Chrome/Safari */ | ||
} | } | ||
/* 单本书的容器 */ | |||
.bookshelf-component-wrapper .book { | .bookshelf-component-wrapper .book { | ||
position: relative | position: relative; | ||
display: block | display: block; | ||
color: white | color: white; | ||
z-index: 1 | z-index: 1; | ||
transition: transform 0.3s ease-out, z-index 0s 0.3s | transition: transform 0.3s ease-out, z-index 0s 0.3s; | ||
cursor: pointer | cursor: pointer; | ||
} | } | ||
.bookshelf-component-wrapper .book:hover { | .bookshelf-component-wrapper .book:hover { | ||
transform: translateY(-15px) | transform: translateY(-15px); | ||
z-index: 10 | z-index: 10; | ||
transition: transform 0.3s ease-out, z-index 0s | transition: transform 0.3s ease-out, z-index 0s; | ||
} | } | ||
/* 书脊 */ | |||
.bookshelf-component-wrapper .book-spine { | .bookshelf-component-wrapper .book-spine { | ||
width: 45px | width: 45px; | ||
height: 240px | height: 240px; | ||
background-color: #a1887f | background-color: #a1887f; /* 默认颜色 */ | ||
border-radius: 4px 4px 0 0 | border-radius: 4px 4px 0 0; | ||
box-shadow: inset 3px 0 8px rgba(0, 0, 0, 0.2) | box-shadow: inset 3px 0 8px rgba(0, 0, 0, 0.2); | ||
display: flex | display: flex; | ||
align-items: center | align-items: center; | ||
justify-content: center | justify-content: center; | ||
writing-mode: vertical-rl | writing-mode: vertical-rl; | ||
text-orientation: mixed | text-orientation: mixed; | ||
font-size: 16px | font-size: 16px; | ||
font-weight: 600 | font-weight: 600; | ||
letter-spacing: 1px | letter-spacing: 1px; | ||
text-shadow: 1px 1px 2px rgba(0,0,0,0.3) | text-shadow: 1px 1px 2px rgba(0,0,0,0.3); | ||
transition: background-color 0.3s ease | transition: background-color 0.3s ease; | ||
} | } | ||
/* 弹出的信息卡片 */ | |||
.bookshelf-component-wrapper .book-info { | .bookshelf-component-wrapper .book-info { | ||
position: absolute | position: absolute; | ||
left: 100% | left: 100%; | ||
bottom: 20px | bottom: 20px; | ||
width: 250px | width: 250px; | ||
background-color: #fff | background-color: #fff; | ||
color: #424242 | color: #424242; | ||
padding: 20px | padding: 20px; | ||
border-radius: 0 6px 6px 0 | border-radius: 0 6px 6px 0; | ||
box-shadow: 5px 5px 20px rgba(0,0,0,0.1) | box-shadow: 5px 5px 20px rgba(0,0,0,0.1); | ||
border: 1px solid #eee | border: 1px solid #eee; | ||
box-sizing: border-box | box-sizing: border-box; | ||
opacity: 0 | opacity: 0; | ||
transform: translateX(-10px) | transform: translateX(-10px); | ||
pointer-events: none | pointer-events: none; | ||
transition: opacity 0.3s ease-out 0.1s, transform 0.3s ease-out 0.1s | transition: opacity 0.3s ease-out 0.1s, transform 0.3s ease-out 0.1s; | ||
} | } | ||
.bookshelf-component-wrapper .book:hover .book-info { | .bookshelf-component-wrapper .book:hover .book-info { | ||
opacity: 1 | opacity: 1; | ||
transform: translateX(0) | transform: translateX(0); | ||
} | } | ||
.bookshelf-component-wrapper .book-info h3 { | .bookshelf-component-wrapper .book-info h3 { | ||
margin: 0 0 10px 0 | margin: 0 0 10px 0; | ||
font-size: 1.1em | font-size: 1.1em; | ||
color: #37474f | color: #37474f; | ||
} | } | ||
.bookshelf-component-wrapper .book-info p { | .bookshelf-component-wrapper .book-info p { | ||
margin: 0 | margin: 0; | ||
font-size: 0.9em | font-size: 0.9em; | ||
line-height: 1.6 | line-height: 1.6; | ||
} | } | ||
.bookshelf-component-wrapper .book:nth-child(1) .book-spine { background-color: #78909c | .bookshelf-component-wrapper .book:nth-child(1) .book-spine { background-color: #78909c; } | ||
.bookshelf-component-wrapper .book:nth-child(2) .book-spine { background-color: #8d6e63 | .bookshelf-component-wrapper .book:nth-child(2) .book-spine { background-color: #8d6e63; } | ||
.bookshelf-component-wrapper .book:nth-child(3) .book-spine { background-color: #66bb6a | .bookshelf-component-wrapper .book:nth-child(3) .book-spine { background-color: #66bb6a; } | ||
.bookshelf-component-wrapper .book:nth-child(4) .book-spine { background-color: #5c6bc0 | .bookshelf-component-wrapper .book:nth-child(4) .book-spine { background-color: #5c6bc0; } | ||
.bookshelf-component-wrapper .book:nth-child(5) .book-spine { background-color: #f06292 | .bookshelf-component-wrapper .book:nth-child(5) .book-spine { background-color: #f06292; } | ||
.bookshelf-component-wrapper .book:nth-child(6) .book-spine { background-color: #FFFAFA | .bookshelf-component-wrapper .book:nth-child(6) .book-spine { background-color: #FFFAFA; } | ||
.bookshelf-component-wrapper .book:nth-child(7) .book-spine { background-color: #FFE4C4 | .bookshelf-component-wrapper .book:nth-child(7) .book-spine { background-color: #FFE4C4; } | ||
.bookshelf-component-wrapper .book:nth-child(8) .book-spine { background-color: #6495ED | .bookshelf-component-wrapper .book:nth-child(8) .book-spine { background-color: #6495ED; } | ||
.bookshelf-component-wrapper .book:nth-child(9) .book-spine { background-color: #B0E0E6 | .bookshelf-component-wrapper .book:nth-child(9) .book-spine { background-color: #B0E0E6; } | ||
.bookshelf-component-wrapper .book:nth-child(10) .book-spine { background-color: #00FF7F | .bookshelf-component-wrapper .book:nth-child(10) .book-spine { background-color: #00FF7F; } | ||
.bookshelf-component-wrapper .book:nth-child(11) .book-spine { background-color: #DEB887 | .bookshelf-component-wrapper .book:nth-child(11) .book-spine { background-color: #DEB887; } | ||
.bookshelf-component-wrapper .book:nth-child(12) .book-spine { background-color: #FF6347 | .bookshelf-component-wrapper .book:nth-child(12) .book-spine { background-color: #FF6347; } | ||
.bookshelf-component-wrapper .book:nth-child(13) .book-spine { background-color: #66bb6a | .bookshelf-component-wrapper .book:nth-child(13) .book-spine { background-color: #66bb6a; } | ||
.bookshelf-component-wrapper .book:nth-child(14) .book-spine { background-color: #5c6bc0 | .bookshelf-component-wrapper .book:nth-child(14) .book-spine { background-color: #5c6bc0; } | ||
.bookshelf-component-wrapper .book:nth-child(15) .book-spine { background-color: #f06292 | .bookshelf-component-wrapper .book:nth-child(15) .book-spine { background-color: #f06292; } | ||
/* | /* 移动端适配 */ | ||
@media (max-width: 600px) { | @media (max-width: 600px) { | ||
.bookshelf-component-wrapper .bookshelf { | .bookshelf-component-wrapper .bookshelf { | ||
width: 100% | width: 100%; | ||
padding-left: 15px | padding-left: 15px; | ||
padding-right: 15px | padding-right: 15px; | ||
justify-content: flex-start | justify-content: flex-start; | ||
gap: 8px | gap: 8px; | ||
} | } | ||
.bookshelf-component-wrapper .book-spine { | .bookshelf-component-wrapper .book-spine { | ||
width: 40px | width: 40px; | ||
height: 200px | height: 200px; | ||
font-size: 14px | font-size: 14px; | ||
} | } | ||
.bookshelf-component-wrapper .book:hover { | .bookshelf-component-wrapper .book:hover { | ||
transform: translateY(-10px) | transform: translateY(-10px); | ||
} | } | ||
.bookshelf-component-wrapper .book-info { | .bookshelf-component-wrapper .book-info { | ||
width: 200px | width: 200px; | ||
bottom: 10px | bottom: 10px; | ||
padding: 15px | padding: 15px; | ||
} | } | ||
.bookshelf-component-wrapper .book-info h3 { font-size: 1em | .bookshelf-component-wrapper .book-info h3 { font-size: 1em; } | ||
.bookshelf-component-wrapper .book-info p { font-size: 0.85em | .bookshelf-component-wrapper .book-info p { font-size: 0.85em; } | ||
} | } | ||
.bookshelf-component-wrapper a:link { | .bookshelf-component-wrapper a:link { | ||
color: white | color: white; | ||
} | } | ||
.bookshelf-component-wrapper a:visited { | .bookshelf-component-wrapper a:visited { | ||
color: lightgray | color: lightgray; | ||
} | } | ||
.bookshelf-component-wrapper a:hover { | .bookshelf-component-wrapper a:hover { | ||
color: #ffffff | color: #ffffff; | ||
text-decoration: underline | text-decoration: underline; | ||
} | } | ||
.bookshelf-component-wrapper a.new { | .bookshelf-component-wrapper a.new { | ||
color: red | color: red; | ||
} | } | ||
.JieYueDengJi a:link { | .JieYueDengJi a:link { | ||
color: white | color: white; | ||
} | } | ||
.JieYueDengJi a:visited { | .JieYueDengJi a:visited { | ||
color: white | color: white; | ||
} | } | ||
.JieYueDengJi a:hover { | .JieYueDengJi a:hover { | ||
color: #ffffff | color: #ffffff; /* 鼠标悬停时颜色 */ | ||
/* | |||
} | } | ||
2026年3月30日 (一) 20:35的最新版本
/* 这里放置的CSS将应用于所有皮肤 */
/* USERNAME */
$( function() {
if ( mw.user.isNamed() ) {
$( '.insertusername' ).text( mw.user.getName() );
} else {
$( '.insertusername' ).text( '访客' );
}
} );
/* --- Bookshelf Component Styles --- */
/* 组件的顶级包裹器,用于限定所有样式的范围 */
.bookshelf-component-wrapper {
/* 可以在这里添加组件外围的边距等 */
}
/* 书架容器 */
.bookshelf-component-wrapper .bookshelf {
display: flex;
align-items: flex-end;
gap: 10px;
width: 80vw;
max-width: 900px;
padding: 20px 20px 15px 20px; /* 底部增加padding以容纳滑动条(即使隐藏) */
border-bottom: 10px solid #8d6e63;
box-sizing: border-box;
overflow-x: auto;
-ms-overflow-style: none; /* IE/Edge */
scrollbar-width: none; /* Firefox */
}
.bookshelf-component-wrapper .bookshelf::-webkit-scrollbar {
display: none; /* Chrome/Safari */
}
/* 单本书的容器 */
.bookshelf-component-wrapper .book {
position: relative;
display: block;
color: white;
z-index: 1;
transition: transform 0.3s ease-out, z-index 0s 0.3s;
cursor: pointer;
}
.bookshelf-component-wrapper .book:hover {
transform: translateY(-15px);
z-index: 10;
transition: transform 0.3s ease-out, z-index 0s;
}
/* 书脊 */
.bookshelf-component-wrapper .book-spine {
width: 45px;
height: 240px;
background-color: #a1887f; /* 默认颜色 */
border-radius: 4px 4px 0 0;
box-shadow: inset 3px 0 8px rgba(0, 0, 0, 0.2);
display: flex;
align-items: center;
justify-content: center;
writing-mode: vertical-rl;
text-orientation: mixed;
font-size: 16px;
font-weight: 600;
letter-spacing: 1px;
text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
transition: background-color 0.3s ease;
}
/* 弹出的信息卡片 */
.bookshelf-component-wrapper .book-info {
position: absolute;
left: 100%;
bottom: 20px;
width: 250px;
background-color: #fff;
color: #424242;
padding: 20px;
border-radius: 0 6px 6px 0;
box-shadow: 5px 5px 20px rgba(0,0,0,0.1);
border: 1px solid #eee;
box-sizing: border-box;
opacity: 0;
transform: translateX(-10px);
pointer-events: none;
transition: opacity 0.3s ease-out 0.1s, transform 0.3s ease-out 0.1s;
}
.bookshelf-component-wrapper .book:hover .book-info {
opacity: 1;
transform: translateX(0);
}
.bookshelf-component-wrapper .book-info h3 {
margin: 0 0 10px 0;
font-size: 1.1em;
color: #37474f;
}
.bookshelf-component-wrapper .book-info p {
margin: 0;
font-size: 0.9em;
line-height: 1.6;
}
.bookshelf-component-wrapper .book:nth-child(1) .book-spine { background-color: #78909c; }
.bookshelf-component-wrapper .book:nth-child(2) .book-spine { background-color: #8d6e63; }
.bookshelf-component-wrapper .book:nth-child(3) .book-spine { background-color: #66bb6a; }
.bookshelf-component-wrapper .book:nth-child(4) .book-spine { background-color: #5c6bc0; }
.bookshelf-component-wrapper .book:nth-child(5) .book-spine { background-color: #f06292; }
.bookshelf-component-wrapper .book:nth-child(6) .book-spine { background-color: #FFFAFA; }
.bookshelf-component-wrapper .book:nth-child(7) .book-spine { background-color: #FFE4C4; }
.bookshelf-component-wrapper .book:nth-child(8) .book-spine { background-color: #6495ED; }
.bookshelf-component-wrapper .book:nth-child(9) .book-spine { background-color: #B0E0E6; }
.bookshelf-component-wrapper .book:nth-child(10) .book-spine { background-color: #00FF7F; }
.bookshelf-component-wrapper .book:nth-child(11) .book-spine { background-color: #DEB887; }
.bookshelf-component-wrapper .book:nth-child(12) .book-spine { background-color: #FF6347; }
.bookshelf-component-wrapper .book:nth-child(13) .book-spine { background-color: #66bb6a; }
.bookshelf-component-wrapper .book:nth-child(14) .book-spine { background-color: #5c6bc0; }
.bookshelf-component-wrapper .book:nth-child(15) .book-spine { background-color: #f06292; }
/* 移动端适配 */
@media (max-width: 600px) {
.bookshelf-component-wrapper .bookshelf {
width: 100%;
padding-left: 15px;
padding-right: 15px;
justify-content: flex-start;
gap: 8px;
}
.bookshelf-component-wrapper .book-spine {
width: 40px;
height: 200px;
font-size: 14px;
}
.bookshelf-component-wrapper .book:hover {
transform: translateY(-10px);
}
.bookshelf-component-wrapper .book-info {
width: 200px;
bottom: 10px;
padding: 15px;
}
.bookshelf-component-wrapper .book-info h3 { font-size: 1em; }
.bookshelf-component-wrapper .book-info p { font-size: 0.85em; }
}
.bookshelf-component-wrapper a:link {
color: white;
}
.bookshelf-component-wrapper a:visited {
color: lightgray;
}
.bookshelf-component-wrapper a:hover {
color: #ffffff;
text-decoration: underline;
}
.bookshelf-component-wrapper a.new {
color: red;
}
.JieYueDengJi a:link {
color: white;
}
.JieYueDengJi a:visited {
color: white;
}
.JieYueDengJi a:hover {
color: #ffffff; /* 鼠标悬停时颜色 */
}