blob: 65b2b38da085e15338777185bb0c6717ff9d87cb [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>object-fit on SVG images</title>
<meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-51" />
<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>