模板:Iconcard:修订间差异

勤求古训,博采众方
跳转到导航 跳转到搜索
删除的内容 添加的内容
小无编辑摘要
小无编辑摘要
第1行: 第1行:
<includeonly>
<includeonly>
<!-- 核心样式:抽离为内联样式(也可迁移到站点CSS) -->
<!-- 核心图标卡片样式:保留原始CSS,修复显示/排列问题 -->
<div style="display:inline-block; vertical-align:top; width:80px; min-width:80px; height:80px; min-height:80px;margin:1px; border:solid 1px; padding:4px; text-align:center; line-height:12px; box-sizing: border-box;">
<div style="
{{fa|{{{1|question-circle}}}|size=28px|style= border-bottom:solid 1px; padding:6px 0; margin-bottom:4px; line-height:28px; display:block; }}
display: inline-block;
⚫
<br/>
vertical-align: top;
<span style="font-size:12px; max-height:24px; line-height: 12px; display:inline-block; width:100%; word-break:break-all; overflow:hidden;">{{{1|question-circle}}}</span>
width: 80px;
min-width: 80px;
height: 80px;
min-height: 80px;
margin: 1px;
border: solid 1px #ccc; /* 浅灰色边框,更通用 */
border-radius: 2px; /* 轻微圆角,提升视觉 */
padding: 4px;
text-align: center;
line-height: 12px;
overflow: hidden; /* 防止图标/文字溢出 */
box-sizing: border-box; /* 盒模型兼容 */
">
<!-- Font Awesome图标:支持默认值+样式 -->
{{fa|{{{1|question-circle}}}|size=28px|style=
display: block; /* 独占一行,避免对齐问题 */
border-bottom: solid 1px #eee;
padding: 8px 0;
margin-bottom: 8px;
color: #333; /* 图标默认颜色 */
}}
<!-- 图标名称:自动换行+溢出隐藏 -->
<span style="
font-size: 12px;
max-height: 24px;
line-height: 12px;
color: #666; /* 文字浅于图标,层级更清晰 */
display: inline-block;
word-break: break-all; /* 超长名称自动换行 */
overflow: hidden;
text-overflow: ellipsis; /* 溢出显示省略号 */
⚫
">
{{{1|question-circle}}}
</span>
</div>
</div>
</includeonly><noinclude>{{Documentation}}</noinclude>
</includeonly>

<noinclude><noinclude>{{Documentation}}</noinclude>

2025年11月26日 (三) 23:11的版本