Skip to main content

slide()

一种展示方式,进入的幻灯片将退出的幻灯片推出。

🌐 A presentation where the entering slide pushes out the exiting slide.

示例

🌐 Example

SlideTransition.tsx
import { linearTiming, TransitionSeries } from "@remotion/transitions"; import { slide } from "@remotion/transitions/slide"; const BasicTransition = () => { return ( <TransitionSeries> <TransitionSeries.Sequence durationInFrames={40}> <Letter color="#0b84f3">A</Letter> </TransitionSeries.Sequence> <TransitionSeries.Transition presentation={slide()} timing={linearTiming({ durationInFrames: 30 })} /> <TransitionSeries.Sequence durationInFrames={60}> <Letter color="pink">B</Letter> </TransitionSeries.Sequence> </TransitionSeries> ); };

应用编程接口

🌐 API

接受具有以下属性的对象:

🌐 Takes an object with the following properties:

direction

from-leftfrom-rightfrom-topfrom-bottom之一。

🌐 One of from-left, from-right, from-top, from-bottom.

TypeScript type
import { SlideDirection } from "@remotion/transitions/slide"; const slideDirection: SlideDirection = "from-left";

enterStyle?v4.0.84

场景进入时容器的样式。

🌐 The style of the container when the scene is is entering.

exitStyle?v4.0.84

场景退出时容器的样式。

🌐 The style of the container when the scene is exiting.

另请参阅

🌐 See also