← 返回提示词
Interaction

悬停图片轨道

水平图片轨道根据悬停时光标速度跟随移动。

作者:mcpSkills
框架
nextjs
UI 库
shadcntailwind
难度advanced
英文提示词
Create a horizontal image track that responds to mouse position. The track should be wider than the viewport and translate horizontally based on cursor X position. Add skew/lean based on cursor velocity for a fluid feel. Use placeholder colored rectangles as images. Use JavaScript to map cursor position to track translation and Tailwind CSS. Place on a dark background.
中文提示词
创建一个响应鼠标位置的水平图片轨道。轨道应比视口宽,根据光标 X 位置水平移动。根据光标速度添加倾斜/倾斜效果以获得流动感。使用彩色占位矩形作为图片。使用 JavaScript 将光标位置映射到轨道位移,Tailwind CSS 设置样式。放置在深色背景上。
悬停图片轨道 screenshot 1
## Overview 感觉像被光标拉动的物理胶片条的画廊。适合作品集和画册。 ## Features - 水平图片轨道 - 光标位置驱动位移 - 基于速度的倾斜 - 占位图片 - 深色背景 - JavaScript + CSS transform ## Usage 适用于作品集、摄影网站或产品画廊。 ## Customization 修改 prompt 以: - 悬停时单张图片放大 - 改为垂直轨道 - 悬停时标题淡入 - 鼠标离开后添加惯性