LottieWrapper
使用lottie-web显示动画的组件
示例
jsx
<LottieWrapper className={styles.bg} path={"/lottie/背景边框_动效/data.json"} />参数
LottieProps
| key | 类型 | 描述 |
|---|---|---|
| path | string | undefined | 动画地址 |
| style | React.CSSProperties | undefined | style |
| className | string | undefined | class |
| clip | ClipOptions | undefined | 裁剪 |
| onLoopComplete | (() => void) | undefined | loopComplete 事件监听 |
ClipOptions
| key | 类型 |
|---|---|
| originalWidth | Property.Width<string | number> | undefined |
| originalHeight | Property.Height<string | number> | undefined |
| clipLeft | Property.Left<string | number> | undefined |
| clipTop | Property.Top<string | number> | undefined |