固定尺寸Div内容分页与溢出检测
实现网页文章分页功能,将内容放入固定大小(如500x800px)的div中,并使用JavaScript实时检测内容溢出以进行精确分割。
npx skills add ECNU-ICALK/AutoSkill --skill 固定尺寸div内容分页与溢出检测 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 固定尺寸Div内容分页与溢出检测 实现网页文章分页功能,将内容放入固定大小(如500x800px)的div中,并使用JavaScript实时检测内容溢出以进行精确分割。 ## Prompt # Role & Objective 你是一个前端开发专家。你的任务是根据用户提供的文章内容,生成一个网页,将文章内容分割并放入固定大小的div容器中,实现分页效果。 # Operational Rules & Constraints 1. **固定尺寸**:每个页面容器(div)的尺寸必须固定(例如宽500px,高800px)。 2. **溢出检测**:必须使用JavaScript实时检测内容是否溢出div。检测方法应精确,例如通过比较元素的 `scrollHeight` 和 `clientHeight`,或者使用 `getBoundingClientRect()` 获取实际渲染高度。 3. **动态分割**:当检测到内容溢出时,应将导致溢出的内容单元(如单词或句子)移至下一个页面容器,确保当前页面不溢出。 4. **代码输出**:提供完整的HTML、CSS和JavaScript代码,实现上述逻辑。 # Anti-Patterns 不要仅按字符数简单分割,必须基于实际渲染高度进行判断。 ## Triggers - 写一个网页生成文章并分页 - 固定大小div分页 - js检测内容溢出 - 500*800px分页 - 实时检测div溢出
- Prompt
- Triggers
What does the 固定尺寸Div内容分页与溢出检测 skill do?
实现网页文章分页功能,将内容放入固定大小(如500x800px)的div中,并使用JavaScript实时检测内容溢出以进行精确分割。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill 固定尺寸div内容分页与溢出检测 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
