返回提示词

Motion Prompt #148|滚动切换背景色 · Background color change on scroll

按区块切换页面背景色

发布于 更新于 浏览 0

部分附加信息、来源说明或示例仍显示原文。

来源:import:liubai_public_20261104 · https://github.com/Shanvision-star/liubai-prompt-library/blob/25f0137e36a8fae46aebace86b18cdfeff624a99/bundled-library/entries/PRM-0390/original.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:

使用示例

提示词正文

请使用“Background color change on scroll”(背景色の切り替え),它是“Landing page & web effects, part 2”中的一个名称。
Motion Prompt #148

定义:页面背景按章节改变颜色。
示例展示:每次滚动进入新章节,整个页面背景从奶油色混合到深蓝,再到浅蓝;深色背景下文字变白。
规格:
- 视口511×168,三个章节各高168 px,即一屏。滚动0.3–1.2 s从0→168 px,1.8–2.7 s从168→336,3.3–4.4 s从336→0,均用三次ease-in-out。单次4.7 s,在9.4 s包循环内播放两次。
- 背景色依次为早晨#FFEBD9、夜晚#1E2A4A、假日#DDE6FF;整页后方绘制单一背景色,跨越章节边界时混合。
- 混合进度在到下一章的滚动行程5%至95%之间0→1,采用二次ease-in-out,由滚动位置而非时间驱动。
- 进入夜晚时标题从深蓝混合为白色,正文条从米色混合为蓝灰色;章节标签(01 MORNING等)保持橙色。
- 各章图片分别为太阳、月亮和星星、山景照片,随页面移动;滚动条滑块跟随滚动。
何时使用:用于每章有独立情绪的叙事页面,或对比日夜、季节等场景。

参考实现(Canvas 2D,画面仅由时间决定的函数):https://showheyohtaki.github.io/motion-prompt/api/v1/en/e/148.txt
共享辅助代码:https://showheyohtaki.github.io/motion-prompt/api/v1/kit/lp2.js
请保持参考实现的形状、时间安排和缓动数值不变,只调整文字、颜色和素材,以适配我正在制作的项目。

使用示例

示例输入

请实现“滚动切换背景色 · Background color change on scroll”:按区块切换页面背景色

示意结果

下方是来源作者提供的静态画面和可播放动效参考,并非本站对该提示词调用模型生成的结果。

提示词仅供参考,请结合实际场景调整,并核实 AI 生成结果。