MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
页面内容被替换为“→这里放置的CSS将应用于所有皮肤: →首行缩进: div.textIndent p { text-indent: 2em; margin: 0.5em 0; } →首字下沉样式: .dropCap::first-letter { float: left; font-size: 3.2em !important; line-height: 0.85em !important; margin-right: 0.1em !important; font-weight: bold; color: #000; }” 标签:替换 手工回退 |
无编辑摘要 |
||
| (未显示同一用户的14个中间版本) | |||
| 第1行: | 第1行: | ||
/* 这里放置的CSS将应用于所有皮肤 */ | /* 这里放置的CSS将应用于所有皮肤 */ | ||
/* | |||
/* USERNAME */ | |||
text- | $( 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; /* 鼠标悬停时颜色 */ | |||
} | } | ||
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; /* 鼠标悬停时颜色 */
}