Html5将视频设置为背景并加上音频 |
您所在的位置:网站首页 › 如何用手机给录音加背景音乐视频播放声音 › Html5将视频设置为背景并加上音频 |
Html5将视频设置为背景并加上音频
Document
video{
position: fixed;
right:0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -9999;
}
gif太大就弄了个图片 要说的都在代码注释里了! 以下是加入音频的代码 Document video{ position: fixed; right:0; bottom: 0; min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: -9999; } #d1{ opacity: 0.5; position: absolute; bottom: 0px; right: 0px; }效果图 为了美观,我设置了透明度并将它放在了右下角。 本来可以自动播放,但是Chrome好像不支持,我以为代码有问题,试了半天。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |