45 lines
1.8 KiB
HTML
45 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<title>object-fit on video poster</title>
|
|
<style type="text/css">
|
|
.group > div {
|
|
display: inline-block;
|
|
overflow: hidden;
|
|
width: 72px;
|
|
height: 72px;
|
|
margin: 2px 10px;
|
|
border: 1px solid black;
|
|
background-color: gray;
|
|
}
|
|
|
|
.group > * > * { display: block; }
|
|
.group > *:nth-child(1) * { width:100%; height:100%; }
|
|
.group > *:nth-child(2) * { width:100%; margin-top:25%; }
|
|
.group > *:nth-child(3) * { height:100%; margin-left:-50%; }
|
|
.group > *:nth-child(4) * { width:288px; margin-left:-108px; margin-top:-36px; }
|
|
.group > *:nth-child(5) * { width:100%; margin-top:25%; }
|
|
.group > *:nth-child(6) * { width:100%; margin-top:25%; }
|
|
.group > *:nth-child(7) * { width:100%; height:100%; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="group">
|
|
<!-- Note about the first video here: There's no way to unlock a video from its
|
|
aspect ratio without using object-fit:fill, so we have to use it here as well
|
|
as in the test file. In order to actually being able to detect failures, use a
|
|
different background color. -->
|
|
<div style="background:salmon;"><video poster="../resources/circles-landscape.png" style="object-fit:fill;"></video></div>
|
|
<div><video poster="../resources/circles-landscape.png"></video></div>
|
|
<div><video poster="../resources/circles-landscape.png"></video></div>
|
|
<div><video poster="../resources/circles-landscape.png"></video></div>
|
|
<div><video poster="../resources/circles-landscape.png"></video></div>
|
|
<div><video poster="../resources/circles-landscape.png"></video></div>
|
|
<div><video poster="../resources/circles-landscape.png" style="width:100%; height:auto; margin:25% 0 0;"></video></div> <!-- default is contain for video -->
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|