打开/关闭菜单
5
1
92
模拟火车世界中文维基
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

Template:信息.css

模板页面
.infoBox {
    max-width: 100%;
    border-left: 10px solid #1e90ff; /* 默认左侧边框颜色 */
    background-color: var(--color-surface-2);
    border-radius: 8px;
    box-shadow: var(--box-shadow-card);
    margin: 1.6rem 0;
    overflow: hidden;
    display: flex;
    align-items: center; /* 使内容垂直居中 */
}

.infoBox[style*="display:flow-root"] {
    display: flow-root;
}

.infoBoxContent {
    padding: 1.5rem;
    background-color: inherit;
    border-radius: 8px;
    display: flex;
    align-items: center; /* 使内容垂直居中 */
}

.infoBoxTitle {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--color-base--emphasized);
    margin-bottom: 1rem;
}

.infoBoxIcon {
    margin-right: 1rem;
    display: flex;
    align-items: center; /* 使图标垂直居中 */
}

.infoBoxIcon img {
    width: 50px; /* 默认图标大小 */
    height: auto;
}

.infoBoxText {
    font-size: 0.875rem;
    color: var(--color-base);
    line-height: 1.6;
    overflow: hidden;
}

.infoBoxBelow {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--color-base--subtle);
    text-align: right;
}

/* 动态样式支持 */
.infoBox[style*="width"] {
    width: auto !important; /* 允许模板中的 width 属性生效 */
}

.infoBox[style*="background-color"] .infoBoxContent {
    background-color: inherit; /* 继承模板中的背景色 */
}

/* 小图标样式 */
.infoBoxIcon img[src*="Icon-info.png"][width="25px"] {
    width: 25px; /* 小图标大小 */
}

/* 响应式设计 */
@media only screen and (max-width: 720px) {
    .infoBox {
        margin: 1rem 0;
        flex-direction: column; /* 移动端改为垂直布局 */
    }

    .infoBoxIcon {
        margin: 0 0 1rem 0;
    }

    .infoBoxIcon img {
        width: 40px; /* 移动端图标大小 */
    }

    .infoBoxText {
        text-align: center;
    }
}