模板:信息框/doc:修订间差异

来自「荏苒之境」
无编辑摘要
无编辑摘要
 
(未显示同一用户的1个中间版本)
第1行: 第1行:
{{模板样式 | 模板:信息框/style.css}}
{{模板示例 | 信息框
{{模板示例 | 信息框
| title,测试标题
| title,测试标题
第8行: 第9行:
| text,测试标题,测试内容
| text,测试标题,测试内容
| section,测试部分2
| section,测试部分2
| text,测试标题2,测试内容2
| image,占位图片.png
| image,占位图片.png
| caption,测试图片说明2
| caption,测试图片说明2
| text,测试标题2,测试内容2
| text,测试标题3,测试内容3
| text,测试标题3,测试内容3
| text,测试标题4,测试内容4
}}
}}

2025年8月8日 (五) 08:11的最新版本

此模板使用的样式:模板:信息框/style.css
.infobox {
    background: #f8f9fa;
    border: 1px solid #a2a9b1;
    float: right;
    font-size: 0.77em;
    margin-left: 15px;
    margin-bottom: 15px;
    width: 300px;
}

.infobox table {
	border-collapse: collapse;
	width: 100%;
}

.infobox tr:only-child {
	display: none;
}

@media screen and (max-width: 660px) {
	.infobox {
		font-size: 0.9em;
		width: 100%;
	}
}

.infobox th {
	padding-top: 0.45em;
	padding-bottom: 0.45em;
	padding-left: 0.7em;
	padding-right: 1em;
	text-align: left;
    vertical-align: top;
    width: 30%;
    border-top: 1px solid #d4d4d4;
}

.infobox td {
	width: 70%;
	padding-top: 0.45em;
	padding-bottom: 0.45em;
	padding-right: 0.7em;
    vertical-align: top;
    border-top: 1px solid #d4d4d4;
}

.infobox tr:last-child > th { padding-bottom: 0.53em; }
.infobox tr:last-child > td { padding-bottom: 0.53em; }

th.infobox-title {
	border-top: none;
    text-align: center;
    font-weight: bold;
    font-size: 1.2em;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0.7em;
    padding-bottom: 0.7em;
}

th.infobox-header {
	text-align: center;
    font-weight: bold;
    font-size: 1em;
    margin-top: 0.5em;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0.7em;
	padding-bottom: 0.7em;
}

th.infobox-image {
	padding: 0;
	border-top: none;
	text-align: center;
}

th.infobox-caption {
	border-top: none;
	font-size: 1em;
	font-weight: lighter;
    text-align: center;
    color: #999999;
    padding-left: 0;
    padding-right: 0;
}
测试标题
测试部分
测试图片说明
测试标题测试内容
测试部分2
测试标题2测试内容2
测试图片说明2
测试标题3测试内容3
测试标题4测试内容4

示例代码:

{{信息框
| title,测试标题
| section,测试部分
| image,占位图片.png
| caption,测试图片说明
| text,测试标题,测试内容
| section,测试部分2
| text,测试标题2,测试内容2
| image,占位图片.png
| caption,测试图片说明2
| text,测试标题3,测试内容3
| text,测试标题4,测试内容4
| title_background = grey
| title_color = white
}}