Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Masonry Test: Masonry layout intrinsic size with only OOF children</title>
<link rel="author" title="Yanling Wang" href="mailto:yanlingwang@microsoft.com">
<link rel="match" href="row-masonry-intrinsic-sizing-oof-ref.html">
<style>
.container {
border: 2px solid black;
margin: 10px;
height: 300px;
position: relative;
}
.masonry {
display: masonry;
masonry-direction: row;
grid-template-rows: repeat(3, auto);
border: 2px solid blue;
padding: 5px;
}
.oof-item {
position: absolute;
background: red;
color: white;
padding: 5px;
border: 1px solid darkred;
}
.oof-1 {
top: 50px;
left: 50px;
width: 60px;
height: 40px;
}
.oof-2 {
top: 150px;
left: 100px;
width: 70px;
height: 50px;
}
</style>
</head>
<body>
<div class="container">
<div class="masonry">
<div class="oof-item oof-1"></div>
<div class="oof-item oof-2"></div>
</div>
</div>
</body>
</html>