视频文字
一个带有视频背景的文本组件。
通过 CLI 安装
手动安装
复制并粘贴以下代码:
VideoText.vue
API
Prop 名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
src | string | Required | The video source URL. |
class | string | "" | Additional classes for the container. |
autoPlay | boolean | true | Whether to autoplay the video. |
muted | boolean | true | Whether to mute the video. |
loop | boolean | true | Whether to loop the video. |
preload | "auto" | "metadata" | "none" | "auto" | Whether to preload the video. |
fontSize | string | number | "120" | Font size for the text mask. |
fontWeight | string | number | "bold" | Font weight for the text mask. |
textAnchor | string | "middle" | Text anchor for the text mask. |
dominantBaseline | string | "middle" | Dominant baseline for the text mask. |
fontFamily | string | "sans-serif" | Font family for the text mask. |
感谢
- Credits to SivaReddy Uppathi for this component.
- Ported from Magic UI's Video Text.