blob: 66ce18cbe689dd8b83cd4f27b98027353c6974d2 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>object-fit on SVG images</title>
<style type="text/css">
img, embed, object, input, canvas, video {
height: 72px;
width: 144px;
margin: 2px 10px;
border: 1px solid black;
background-color: gray;
}
.group { object-fit: contain; }
.group > *:nth-child(1) { object-position: center center; }
.group > *:nth-child(2) { object-position: 20px 10px; }
.group > *:nth-child(3) { object-position: 50% 25%; }
.group > *:nth-child(4) { object-position: bottom 10px right 10px; }
.group > *:nth-child(5) { object-position: bottom 10% right 30%; }
</style>
</head>
<body>
<div class="group">
<img src="../resources/circle.svg" type="image/svg+xml">
<img src="../resources/circle.svg" type="image/svg+xml">
<img src="../resources/circle.svg" type="image/svg+xml">
<img src="../resources/circle.svg" type="image/svg+xml">
<img src="../resources/circle.svg" type="image/svg+xml">
</div>
<div class="group">
<img src="../resources/circle2.svg" type="image/svg+xml">
<img src="../resources/circle2.svg" type="image/svg+xml">
<img src="../resources/circle2.svg" type="image/svg+xml">
<img src="../resources/circle2.svg" type="image/svg+xml">
<img src="../resources/circle2.svg" type="image/svg+xml">
</div>
</body>
</html>