MediaWiki:Common.css:修订间差异

来自迷你世界维基
无编辑摘要
清空全部内容
标签清空
 
第1行: 第1行:
/* =================================================================== */
/* Modern Div-Based Infobox (Final, Stable Version)                    */
/* This version uses divs instead of tables to avoid layout conflicts. */
/* =================================================================== */


/* --- 1. Main Container --- */
.infobox-div {
  float: right;
  width: 300px;
  margin: 0.5em 0 1em 1.5em;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  font-size: 90%;
  line-height: 1.6;
  overflow: hidden; /* Keeps content within rounded corners */
}
/* --- 2. Header --- */
.infobox-div-header {
  background-color: #495057;
  color: #ffffff;
  font-size: 1.25em;
  font-weight: 600;
  padding: 0.8em 1em;
  text-align: center;
}
/* --- 3. Image Area --- */
.infobox-div-image {
  padding: 1em;
  text-align: center;
  border-bottom: 1px solid #dee2e6; /* Separator line */
}
.infobox-div-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}
.infobox-div-caption {
  margin-top: 0.75em;
  font-size: 0.95em;
  color: #6c757d;
  line-height: 1.4;
}
/* --- 4. Data Row Layout (The Magic) --- */
.infobox-div-row {
  display: flex; /* Uses modern flexbox for layout */
  border-top: 1px solid #dee2e6;
}
/* This selector ensures the very first row doesn't have a top border */
.infobox-div-image + .infobox-div-row,
.infobox-div-header + .infobox-div-row {
  border-top: none;
}
/* --- 5. Label and Data Cells --- */
.infobox-div-label,
.infobox-div-data {
  padding: 0.7em 1em;
  vertical-align: top;
}
.infobox-div-label {
  width: 35%;
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}
.infobox-div-data {
  width: 65%;
  color: #212529;
}
/* --- 6. Footer --- */
.infobox-div-footer {
  background-color: #fff3cd;
  color: #856404;
  text-align: center;
  padding: 0.7em;
  font-size: 0.9em;
  border-top: 1px solid #dee2e6;
}
/* --- 7. Responsive for Mobile --- */
@media (max-width: 720px) {
  .infobox-div {
    float: none;
    width: 100%;
    margin: 1.5em 0;
  }
}

2025年10月2日 (四) 13:52的最新版本