MediaWiki:Common.css
来自卡厄思梦境WIKI
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5。
/* 这里放置的CSS将应用于所有皮肤 */
/* 手机端和PC端显示控制 */
@media screen and (max-width: 640px) {
.desktop-only {
display: none !important;
}
}
@media screen and (min-width: 641px) {
.mobile-only {
display: none !important;
}
}
/* 隐藏通知图标 */
#echo-notifications {
display:none;
}
/* 隐藏底部图标 */
#footer-right-icons {
display:none;
}
/* 黑幕 */
.heimu {
background-color: #252525;
color: #252525;
transition: color 0.5s;
}
.heimu:hover {
color: #ffffff;
}
/* 切换标签 */
.main-line-wrap {
margin: 10px 0;
font-family: Arial, sans-serif;
}
.resp-tabs {
background: transparent;
}
.resp-tabs-list {
list-style: none;
margin: 0;
padding: 0;
background: transparent;
overflow: hidden;
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.resp-tabs-list::after {
content: "";
display: table;
clear: both;
}
.czn-list-style {
margin: 0;
padding: 0;
cursor: pointer;
transition: all 0.2s ease;
border-radius: 4px;
background-color: #f5f5f5;
border: 1px solid #ddd;
border-top: 1px solid #ddd !important;
border-bottom: 1px solid #ddd !important;
border-left: 1px solid #ddd !important;
border-right: 1px solid #ddd !important;
}
.czn-list-style:hover {
background-color: #e8e8e8;
border: 1px solid #ddd !important;
}
.czn-list-style.active {
background-color: #007bff;
color: white;
border: 1px solid #007bff !important;
}
.czn-list-style.active:hover {
background-color: #0056b3;
border: 1px solid #0056b3 !important;
}
.tab-panel {
display: block;
padding: 8px 16px;
color: #333;
text-decoration: none;
font-weight: normal;
transition: color 0.2s ease;
white-space: nowrap;
min-width: 60px;
text-align: center;
font-size: 14px;
border: none !important;
}
.czn-list-style.active .tab-panel {
color: white;
}
.resp-tabs-container {
padding: 0;
background: transparent;
margin-top: 8px;
}
.resp-tab-content {
display: none;
animation: fadeIn 0.2s ease-in-out;
background: transparent;
padding: 0;
border: none !important;
}
.resp-tab-content[style*="display:block"],
.resp-tab-content[style*="display: block"] {
display: block !important;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* 响应式设计 */
@media (max-width: 768px) {
.resp-tabs-list {
flex-direction: column;
gap: 4px;
}
.czn-list-style {
width: 100%;
border: 1px solid #ddd !important;
}
.tab-panel {
padding: 6px 12px;
min-width: auto;
font-size: 13px;
border: none !important;
}
.resp-tabs-container {
margin-top: 6px;
}
}
/* 按钮 */
.btn {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
.btn-default {
color: #333;
background-color: #fff;
border-color: #ccc;
}
/* 筛选按钮被选中 */
li.btn.cardSelectOption.selected {
color: #333!important;
background-color: #e6e6e6!important;
border-color: #adadad!important;
outline: 0;
-webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
}
@media only screen and (max-width: 600px) {
li.btn.cardSelectOption {
padding: 4px 8px;
font-size: 12px;
}
li.btn.cardSelectOption:hover {
color: #333;
background-color: #fff;
border-color: #adadad;
}
}
/* 隐藏默认目录 */
.mw-parser-output .toc {
display: none !important;
}
/* 悬浮目录 */
#toc-sidebar {
position: fixed;
left: 0;
top: 30%;
background-color: #f8f9fa;
border: 1px solid #a2a9b1;
border-left: none;
border-radius: 0 5px 5px 0;
padding: 5px 2px;
z-index: 100;
width: 36px;
transition: width 0.3s;
overflow: hidden;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}
#toc-sidebar.expanded {
width: 250px;
padding: 10px;
}
#toc-sidebar-trigger {
cursor: pointer;
font-weight: bold;
text-align: center;
writing-mode: vertical-lr; /* 修改为vertical-lr */
height: auto;
white-space: nowrap;
}
#toc-sidebar.expanded #toc-sidebar-trigger {
writing-mode: horizontal-tb;
}
#toc-sidebar-content {
display: none;
padding-top: 10px;
width: 230px;
max-height: 60vh;
overflow-y: auto;
}
#toc-sidebar.expanded #toc-sidebar-content {
display: block;
}
/* 隐藏目录中的小圆点 */
#toc-sidebar-content ul {
list-style-type: none;
padding-left: 15px;
margin: 0;
}
#toc-sidebar-content li {
margin: 3px 0;
}
/* 稀有度 */
.rarity-5 {
width: 150px;
height: 5px;
background: linear-gradient(135deg, #e882e8, #6fffff);
box-shadow:
0 0 15px rgba(110, 69, 226, 0.5),
0 0 30px rgba(136, 211, 206, 0.3);
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rarity-4 {
width: 150px;
height: 5px;
background: linear-gradient(135deg, #e5a563, #f1cf97);
box-shadow:
0 0 15px rgba(110, 69, 226, 0.5),
0 0 30px rgba(136, 211, 206, 0.3);
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rarity-3 {
width: 150px;
height: 5px;
background: linear-gradient(135deg, #3b4785, #c3e7f9);
box-shadow:
0 0 15px rgba(110, 69, 226, 0.5),
0 0 30px rgba(136, 211, 206, 0.3);
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* 卡牌系统样式 */
#card-overlay {
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
}
#card-display-container {
animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
.game-card {
transition: transform 0.2s ease;
}
.game-list .game-card:hover,
.game-grid .game-card:hover {
transform: scale(1.05);
z-index: 10;
}
#card-overlay .game-card {
transform: none !important;
}
/* 修复卡牌描述布局 */
#card-overlay .game-card > div:last-child {
display: flex !important;
align-items: center !important;
justify-content: center !important;
}
/* 确保放大的卡牌元素正确显示 */
#card-overlay .game-card div[style*="position: absolute"] {
transform-origin: center center;
}
/* 滚动条美化 */
#card-overlay ::-webkit-scrollbar {
width: 8px;
height: 8px;
}
#card-overlay ::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.1);
border-radius: 4px;
}
#card-overlay ::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.3);
border-radius: 4px;
}
#card-overlay ::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.5);
}
/* 卡牌悬停 */
.card-hover-container {
position: relative;
display: inline;
}
.card-name {
color: #4a90e2;
border-bottom: 1px dotted #4a90e2;
cursor: pointer;
white-space: nowrap;
}
.card-popup-container {
display: none;
position: absolute;
z-index: 1000;
left: 0;
top: 100%;
margin-top: 5px;
background: none;
}
.card-hover-container:hover .card-popup-container {
display: block;
}
.card-popup {
display: block;
background: none;
padding: 0;
box-shadow: none;
}
/* 确保游戏卡牌正确显示 */
.card-popup .game-card {
margin: 0 !important;
}
/* 全局 tooltip 容器 */
.dictionary-tooltip-container {
position: absolute;
width: 250px;
z-index: 10000;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s ease;
}
.dictionary-tooltip-container.active {
opacity: 1;
}
/* 卡牌描述滚动容器 */
.card-description-scroll {
position: absolute;
bottom: 7px;
left: 15px;
width: 144px;
height: 100px;
overflow: hidden;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.card-description-scroll-inner {
width: 100%;
}
.card-description-text {
font-size: 12px;
color: white;
line-height: 13px;
padding: 5px 0;
}
/* 滚动动画关键帧 */
@keyframes cardScrollUp {
0%, 10% {
transform: translateY(0);
}
90%, 100% {
transform: translateY(calc(-100% + 100px));
}
}
/* 需要滚动时:取消居中,从顶部开始 */
.game-card.card-description-scrollable .card-description-scroll {
align-items: flex-start; /* 顶部对齐 */
}
/* 应用滚动动画 */
.game-card.card-description-scrollable .card-description-scroll-inner {
animation: cardScrollUp 8s ease-in-out infinite;
}
/* 悬停暂停 */
.game-card.card-description-scrollable:hover .card-description-scroll-inner {
animation-play-state: paused;
}