Motion Prompt #075|吸顶页头 · Sticky header(中文译文)
滚动时页头停留在屏幕顶部;中文译文,效果未实测。
来源:import:liubai_versions_20261104 · https://github.com/Shanvision-star/liubai-prompt-library/blob/25f0137e36a8fae46aebace86b18cdfeff624a99/bundled-library/entries/PRM-0317/translation-zh.md · 授权:MIT License Copyright (c) 2026 Shohei Ohtaki Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
使用示例提示词正文
请使用“Sticky header”(追従ヘッダー),它是“Landing page & web effects”中的一个名称。 Motion Prompt #075 定义:页面滚动时,页头保持在顶部。 示例展示:公告条滚走后,下方页头停在顶部边缘,内容从其下面继续滚动。 规格: - 滚动量在0.4–1.3 s从0→110 px,1.9–2.8 s从110→250 px,3.4–4.4 s从250→0,使用cubic ease-in-out。 - 页面最上方是22 px高的深蓝公告条,其下是34 px高的页头,内含标志、三个菜单项和按钮。 - 页头位置=max(22 − scroll, 0):公告条离开后,页头停在顶部,对应position: sticky; top: 0。 - 随后24 px滚动区间内,页头下方12 px阴影的不透明度从0渐增到0.16。 - 照片、标题和三张卡片按正常速度从页头下方滚动。 何时使用:在长页面中始终保留可访问的菜单和行动按钮。 参考实现(Canvas 2D,画面仅由时间决定的函数):https://showheyohtaki.github.io/motion-prompt/api/v1/en/e/075.txt 共享辅助代码:https://showheyohtaki.github.io/motion-prompt/api/v1/kit/lp.js 请保持参考实现的形状、时间安排和缓动数值不变,只调整文字、颜色和素材,以适配我正在制作的项目。
使用示例
示例输入
请实现“吸顶页头 · Sticky header”:滚动时页头停留在屏幕顶部;中文译文,效果未实测。
示意结果
下方是来源作者提供的静态画面和可播放动效参考,并非本站对该提示词调用模型生成的结果。
提示词仅供参考,请结合实际场景调整,并核实 AI 生成结果。