如何制作半页的全屏html背景视频?
问题描述:
如何制作半页的html背景视频?如何制作半页的全屏html背景视频?
.video {
position: fixed; no-repeat;
top: 50%; left: 50%;
z-index:-1000;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
transform: translate(-50%, -50%);
}
我使用此代码的完整背景视频,但我只想要标题部分。
答
尝试将高度值更改为50%和删除顶部:50%:
{
position: fixed; no-repeat;
left: 50%;
z-index:-1000;
min-width: 100%;
min-height: 100%;
width: auto;
height: 50%;
transform: translate(-50%, -50%);
}
+0
该视频出现在该部分的标题和结尾处。 有关如何从截面区域删除视频的任何想法? –
+0
你能告诉你html代码以便更好地理解吗? –
+0
请添加一些标记代码或者一个小提琴/ plnkr? –
问题寻求帮助调试(“为什么不,或者如何让这段代码的工作?”)必须包括所需的行为,特定的问题或错误以及在问题本身中重现问题所需的最短代码。没有明确问题陈述的问题对其他读者无益。请参阅:[如何创建最小,完整和可验证示例](http://stackoverflow.com/help/mcve)。 – LGSon