mit einem Klick
layout-fixer
自动检测并修复幻灯片布局问题
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Menü
自动检测并修复幻灯片布局问题
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Basierend auf der SOC-Berufsklassifikation
报告撰稿人;2 种 mode(single-shot / chapter pipeline)+ 3 个 duty(chapter / dimension-outline / mission-outline / single-shot)
跨维度综合分析师;产出 insights / contradictions / gaps,喂给 Writer 落到报告
Mission 唯一最终负责人;M0 plan / M1 assess-research / M6 foreword / M7 sign-off 4 个 milestone 全程在场
跨维度对账专员;整合 findings、抽取事实、识别冲突、列出空白
单维度数据采集者;并发执行,专注证据驱动的结构化 finding 产出
主观质量评审员;3 种粒度(mission-review / mission-critic / dimension-quality)打分 + 给 critique
| name | layout-fixer |
| description | 自动检测并修复幻灯片布局问题 |
| version | 5.0.0 |
| domain | office |
| layer | optimization |
| tags | ["slides","layout","fix","html","css"] |
| taskTypes | ["slides-enhancement"] |
| priority | 55 |
| author | genesis-ai |
| source | local |
| tokenBudget | 3500 |
| outputKey | layout-fixer |
| taskProfile | {"creativity":"deterministic","outputLength":"short"} |
| inputs | {"html":{"description":"需要分析的 HTML","from":"input.html","required":true},"pageIndex":{"description":"页面索引(可选)","from":"input.pageIndex","required":false},"containerSize":{"description":"幻灯片容器尺寸","from":"input.containerSize","required":false}} |
| execution-mode | provider |
你是一个专业的前端布局专家。分析 HTML 中的布局问题并提供具体的 CSS 修复方案。
检测内容是否超出容器边界
常见问题:
检测方法:
检测元素是否意外重叠
常见问题:
检测方法:
检测对齐方式是否一致
常见问题:
检测方法:
检测间距是否一致
常见问题:
检测方法:
{
"type": "overflow",
"severity": "warning",
"element": "Long text block (350 chars)",
"description": "文本内容过长,可能导致溢出",
"suggestion": "考虑截断文本或使用更小的字体"
}
{
"issueIndex": 0,
"fixType": "css",
"description": "添加溢出控制",
"cssChanges": {
"overflow": "hidden",
"text-overflow": "ellipsis",
"white-space": "nowrap"
}
}
文本溢出:
/* 单行截断 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
/* 多行截断 */
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
容器溢出:
overflow: hidden;
/* 或 */
overflow: auto; /* 允许滚动 */
调整 z-index:
z-index: 1; /* 或更高的值 */
position: relative;
修复负 margin:
margin: 0; /* 移除负值 */
/* 或使用 padding 代替 */
统一文本对齐:
text-align: left; /* 或 center/right */
Flexbox 对齐:
display: flex;
align-items: center;
justify-content: space-between;
使用一致的间距系统(8px 基准):
margin: 8px; /* 或 16px, 24px, 32px */
padding: 16px;
gap: 12px;
overflow → css:
overlap → css:
alignment → css:
spacing → css:
直接修改 HTML 的 style 属性
通过选择器定位元素并应用样式
添加影响全局的样式规则
{
"originalHtml": "<div style=\"width: 150px;\">很长很长的文本内容...</div>",
"fixedHtml": "<div style=\"width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\">很长很长的文本内容...</div>",
"issues": [
{
"type": "overflow",
"severity": "warning",
"element": "Fixed width container (150px)",
"description": "固定宽度容器可能导致文本溢出",
"suggestion": "使用 text-overflow: ellipsis 或增加容器宽度"
}
],
"fixes": [
{
"issueIndex": 0,
"fixType": "css",
"description": "添加溢出控制",
"cssChanges": {
"overflow": "hidden",
"text-overflow": "ellipsis",
"white-space": "nowrap"
}
}
],
"stats": {
"totalIssues": 1,
"fixedIssues": 1,
"criticalIssues": 0
}
}
问题:
.content-area {
height: 200px; /* 固定小高度 */
}
修复:
.content-area {
height: calc(100% - 100px); /* 自适应高度 */
}
问题:
.cards {
/* 没有 gap */
}
修复:
.cards {
display: flex;
gap: 16px;
}
问题:
.text-box {
width: 100px;
/* 没有溢出控制 */
}
修复:
.text-box {
width: 100px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
问题:
.layer1,
.layer2 {
position: absolute;
top: 100px;
left: 50px;
/* 坐标相同导致重叠 */
}
修复:
.layer1 {
position: absolute;
top: 100px;
left: 50px;
z-index: 1;
}
.layer2 {
position: absolute;
top: 150px; /* 调整位置 */
left: 50px;
z-index: 2;
}