我正在尝试获取覆盖视频的文本,并根据其大小调整进行操作.
目前我的麻烦是使视频的容器与播放器的尺寸相同(以及全屏模式).
我的容器相对定位,我的视频和文本叠加div都绝对定位:
CSS:
#container {
position: relative;
}
#videoPlayer{
position: absolute;
z-index: -1;
}
#videoCaption{
position: absolute;
z-index: 2147483647;
font-size: 80%;
line-height: 125%;
text-align: left;
color: #c9302c;
background-color: #000000;
font-weight: normal;
text-decoration: none;
font-family: "monospaceSansSerif";
}
容器没有高度(1904px x 0px),视频播放器是1280px x 720px,我的videoCaption div是205px x 16px(带文本的大小),卡在播放器的左上角.
好吧,基本上我想要实现的结果有点像Youtube视频弹出窗口覆盖.
欢迎任何领导.
谢谢