更多操作
Imxiaoanag(留言 | 贡献) 创建页面,内容为“.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;…” |
Imxiaoanag(留言 | 贡献) Imxiaoanag将页面Template:信息.css的内容模型从“wikitext”更改为“已过滤的CSS” |
||
(没有差异)
|
2025年5月17日 (六) 21:29的最新版本
.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;
}
}