为什么我的视频盘旋在我的视频播放器上重叠?
基本上,当悬停时,我的图像是 *2缩放的,它按照我的期望与我的视频重叠,问题在于,它仅与我的视频重叠,而不是带有计时器和视频的播放按钮的播放器。我试图添加z索引:2英寸Voyage-image:悬停,但似乎没有效果。因此,我想要的是,当悬停时,图像与视频和播放器重叠...谢谢您的帮助:)
另外,我是MacOS用户,并使用勇敢!
.fiche-voyage {
width: 100vw;
}
.voyage-image-row {
width: 50%;
display: flex;
margin: 0 auto;
justify-content: space-around;
}
.voyage-media-container {
width: 50%;
padding: 15px;
text-align: center;
display: flex;
align-items: center;
}
.voyage-image,
.voyage-video {
width: 100%;
}
.voyage-image:hover {
transform: scale(2);
transition: cubic-bezier(0.165, 0.84, 0.44, 1) 0.25s;
z-index: 2;
}
<div class="fiche-voyage">
<div class=" voyage-image-row">
<div class="voyage-media-container">
<div class="voyage-media-align">
<img src="https://i.discogs.com/1pfWOq9PLZlhgHWipY4dcKuFEh-0JQiSrG8Fvo79j60/rs:fit/g:sm/q:40/h:300/w:300/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTEyMTM3/MTI2LTE1MjkwNDM2/MTMtMzQ4NS5wbmc.jpeg" class="voyage-image">
<p>caption</p>
</div>
</div>
<div class="voyage-media-container">
<div class="voyage-media-align">
<video controls="controls" class="voyage-video">
<source src="video1.mp4">
</video>
<p>caption</p>
</div>
</div>
</div>
</div>
Basically when hovered, my image is *2 scaled and it overlaps my video as I expect it to, the problem is that it only overlaps my video, not the player with the timer and the play button of my video. I've tried to add a z-index: 2 in .voyage-image:hover but it seems like it has no effect. So, what i'd like is when hovered, the image overlaps the video AND the player... Thanks for your help :)
Also, I'm a MacOS user and using Brave!
.fiche-voyage {
width: 100vw;
}
.voyage-image-row {
width: 50%;
display: flex;
margin: 0 auto;
justify-content: space-around;
}
.voyage-media-container {
width: 50%;
padding: 15px;
text-align: center;
display: flex;
align-items: center;
}
.voyage-image,
.voyage-video {
width: 100%;
}
.voyage-image:hover {
transform: scale(2);
transition: cubic-bezier(0.165, 0.84, 0.44, 1) 0.25s;
z-index: 2;
}
<div class="fiche-voyage">
<div class=" voyage-image-row">
<div class="voyage-media-container">
<div class="voyage-media-align">
<img src="https://i.discogs.com/1pfWOq9PLZlhgHWipY4dcKuFEh-0JQiSrG8Fvo79j60/rs:fit/g:sm/q:40/h:300/w:300/czM6Ly9kaXNjb2dz/LWRhdGFiYXNlLWlt/YWdlcy9SLTEyMTM3/MTI2LTE1MjkwNDM2/MTMtMzQ4NS5wbmc.jpeg" class="voyage-image">
<p>caption</p>
</div>
</div>
<div class="voyage-media-container">
<div class="voyage-media-align">
<video controls="controls" class="voyage-video">
<source src="video1.mp4">
</video>
<p>caption</p>
</div>
</div>
</div>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试这个!
在这里,我在第三个Div中添加了另一个类,并将其Z Index设置为1。
谢谢和最诚挚的问候!
Try this one!
In here I have add another class to the third div and set its z-index to 1.
Thanks and best regards!