Ich versuche, ein Video-Element zwischen zwei Divs zu setzen. Die DIVs sollten das Video überlagern, so dass Teile des Videos für den Kunden nicht sichtbar sind. Mein Englisch ist nicht die beste, also machte ich ein kleines Bild :) Es sollte wie folgt aussehen:DIVs links und rechts über VIDEO
+ full video width +
+------------------------------------------+
+------------+-----------------+-----------+
| | | |
| | | |
| | | |
| | | |
| Overlay1 | Visible part | Overlay2 |
| | of video | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
+------------+-----------------+-----------+
Mein HTML und CSS-Code sieht wie folgt aus:
#videoElement {
margin: 0;
padding: 0;
display: block;
width: 1280px;
height: 720px;
}
.video-overlay1 {
position: absolute;
left: 0px;
top: 0px;
margin: 0px;
width: 280px;
height: 720px;
background-color: blueviolet;
}
.video-overlay2 {
position: absolute;
left: 1000px;
top: 0px;
margin: 0px;
width: 280px;
height: 720px;
background-color: blueviolet;
}
<div class="video-overlay1">
<div class="video-overlay2">
<video autoplay="true" id="videoElement"></video>
</div>
</div>
benötigt, die mich auf die Antwort geführt. Danke @ Stan-Howe –