-1
我有兩個視頻並排在瀏覽器中,我希望它們具有瀏覽器窗口的完整大小。我不在乎裁剪視頻。我希望讓他們在視頻中間的每一箇中間位置都放置一個頂部,底部,右側和左側的溢出區域。我想要達到這個效果(http://css-tricks.com/multiple-backgrounds-left-half-and-right-half/),但對於視頻本質而言。兩個全屏視頻背景並排在一個窗口中
我的代碼如下:
<!DOCTYPE HTML>
<html>
<head>
<style>
#leftHalf {
width: 50%;
position: absolute;
left: 0px;
overflow: hidden;
}
#rightHalf {
width: 50%;
position: absolute;
right: 0px;
overflow: hidden;
}
</style>
</head>
<body>
<!--This is the code that's not working, should have specified-->
<video id="rightHalf"width="100%" height="100%" preload autoplay loop muted>
<source src="videos/sky.webmsd.webm" type="video/webm">
<source src="videos/sky,mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
<video id="leftHalf" width="100%" height="100%" preload autoplay loop muted>
<source src="videos/MVI_2987_1.mp4" type="video/mp4">
<source src="videos/MVI_2987_1.webmhd.webm" type="video/webm">
Your browser does not support HTML5 video.
</video>
</body>
</html>
好了,這有什麼錯,你有什麼? – 2014-09-24 01:34:15
輸出是怎麼回事?它做了什麼,它不應該做什麼?你可以上傳演示或屏幕? – sidewaiise 2014-09-24 01:34:41
我改變了它,所以你可以測試自己。它們並排出現,但它們不是瀏覽器窗口的全高 – JakeB 2014-09-24 01:44:48