简体   繁体   English

我如何在 React js 中插入 mp4 作为背景

[英]How would i insert a mp4 as a background in react js

Need help trying to add the video as a background需要帮助尝试将视频添加为背景

You could use the video tag and change the element size to what you need.您可以使用video标签并将元素大小更改为您需要的大小。 Check this link .检查此 链接

you need to import the gif:您需要导入 gif:

import bg from "./config/images/bg.gif";

image={CONFIG.SHO_BACKGROUND ? bg : null}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 JS/React 中下载 mp4 视频? - How to Download mp4 video in JS/React? 如何在Konva舞台上添加视频(.mp4,.mov)? - How would I add a video (.mp4, .mov) at Konva stage? 我将如何将 mp3 文件打包到 mp4 容器中? - How would I go about packaging an mp3 file into an mp4 container? 如何使用Vanilla JS将mp4视频插入具有特定尺寸的html文档中,播放2秒钟,然后删除该节点? - How do I use vanilla JS to insert an mp4 video into an html document with specific dimensions, play it for 2 seconds, and then remove the node? 如何从react js中的url下载文件(.jpg/.txt/.pdf/.mp4)? - How to download a file(.jpg/.txt/.pdf/.mp4) from url in react js? Node.js将html启动到localhost:8000,如何在该html文件中调用.mp3 / .mp4文件 - Node.js launches html to localhost:8000, how can I call a .mp3/.mp4 file in that html file 如何将我的 P5.js 文件导出为 gif 或 MP4? - How do I export my P5.js file into a gif or MP4? 如何从 https 链接下载 MP4 文件并在 Node.js 中重定向? - How can I download MP4 file from https link with redirect in Node.js? 如何使用 node.js 下载视频 mp4 文件? - how can i download a video mp4 file using node.js? React JS:如何将 static 个文件传递给前端(Django、React、Webpack)+(没有为 .MP4 文件配置加载程序) - React JS: How to pass static files to front-end (Django, React, Webpack) + ( no loaders are configured for .MP4 files )
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM