Skip to content

Instantly share code, notes, and snippets.

@shinglyu shinglyu/flexbox-test.html Secret

Created Apr 27, 2016
Embed
What would you like to do?
flexbox-test
<html>
<head>
<style>
.container {
/*padding: 10px;*/
display: flex;
/*align-items: center;*/
background: #202020;
height: 500px;
width: 500px;
z-index: -1;
border: 1px solid white;
}
.container > div {
height: 100px;
width: 100px;
}
#item0 {
background: red;
}
#item1 {
background: yellow;
}
#item2 {
background: blue;
}
</style>
</head>
<body>
<h1>row</h1>
<div class="container" style="flex-direction: row;">
<div id="item0">
<h1>0</h1>
</div>
<div id="item1">
<h1>1</h1>
</div>
<div id="item2">
<h1>2</h1>
</div>
</div>
<h1>row-reverse</h1>
<div class="container" style="flex-direction: row-reverse;">
<div id="item0">
<h1>0</h1>
</div>
<div id="item1">
<h1>1</h1>
</div>
<div id="item2">
<h1>2</h1>
</div>
</div>
<h1>column</h1>
<div class="container" style="flex-direction: column;">
<div id="item0">
<h1>0</h1>
</div>
<div id="item1">
<h1>1</h1>
</div>
<div id="item2">
<h1>2</h1>
</div>
</div>
<h1>column-reverse</h1>
<div class="container" style="flex-direction: column-reverse;">
<div id="item0">
<h1>0</h1>
</div>
<div id="item1">
<h1>1</h1>
</div>
<div id="item2">
<h1>2</h1>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.