зеркало из https://github.com/mozilla/gecko-dev.git
112 строки
3.0 KiB
HTML
112 строки
3.0 KiB
HTML
<!DOCTYPE html>
|
|
<!-- Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
|
<html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Flexbox Test Reference: Fragmentation of single-line row flex container</title>
|
|
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
|
|
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
|
|
|
|
<style>
|
|
.multicol {
|
|
height: 50px;
|
|
width: 320px;
|
|
column-count: 3;
|
|
column-fill: auto;
|
|
column-gap: 10px;
|
|
border: 5px solid orange;
|
|
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
|
|
}
|
|
.flexContainer {
|
|
background: gray;
|
|
/* border-width is 0 by default; some sub-testcases will increase it. */
|
|
border: 0 solid lightgray;
|
|
height: 100px;
|
|
position: relative;
|
|
}
|
|
.border-padding {
|
|
border-width: 10px 0;
|
|
padding: 5px 0;
|
|
}
|
|
.gap {
|
|
width: 4px;
|
|
height: 100%;
|
|
}
|
|
|
|
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
|
|
header, nav, article, footer {
|
|
width: 25px;
|
|
}
|
|
header {
|
|
background: cyan;
|
|
height: 100px;
|
|
position: absolute;
|
|
top: 0px;
|
|
}
|
|
nav {
|
|
background: magenta;
|
|
height: 25px;
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 25px;
|
|
}
|
|
article {
|
|
background: yellow;
|
|
height: 50px;
|
|
position: absolute;
|
|
top: 25px;
|
|
left: 50px;
|
|
}
|
|
footer {
|
|
background: black;
|
|
height: 75px;
|
|
position: absolute;
|
|
top: 25px;
|
|
left: 75px;
|
|
}
|
|
</style>
|
|
|
|
<body>
|
|
<!-- Basic one without any margin/border/padding. -->
|
|
<div class="multicol">
|
|
<div class="flexContainer">
|
|
<header></header><nav></nav><article></article><footer></footer>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Test a container with margin-top. -->
|
|
<div class="multicol">
|
|
<div class="flexContainer" style="margin-top: 25px">
|
|
<header></header><nav></nav><article></article><footer></footer>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Test a container not at the top of the column/page. -->
|
|
<div class="multicol">
|
|
<div style="height: 25px"></div>
|
|
<div class="flexContainer">
|
|
<header></header><nav></nav><article></article><footer></footer>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Test a container with border and padding. -->
|
|
<div class="multicol">
|
|
<div class="flexContainer border-padding">
|
|
<!-- Adjust top to simulate padding. -->
|
|
<header style="top: 5px"></header><nav style="top: 5px"></nav>
|
|
<article style="top: 30px"></article><footer style="top: 30px"></footer>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Test a container with border, padding, and column-gap. -->
|
|
<div class="multicol">
|
|
<div class="flexContainer border-padding">
|
|
<header style="width: 22px; top: 5px"></header>
|
|
<nav style="width: 22px; top: 5px; left: 26px"></nav>
|
|
<article style="width: 22px; top: 30px; left: 52px;"></article>
|
|
<footer style="width: 22px; top: 30px; left: 78px;"></footer>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|