Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Restoration/a23b9d505fc0a764cfc92e95b71e07fa to your computer and use it in GitHub Desktop.

Select an option

Save Restoration/a23b9d505fc0a764cfc92e95b71e07fa to your computer and use it in GitHub Desktop.
FlexibleBox
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div class="flex-box">
<section>short text</section>
<section>long text long text</section>
<section>more long text more long text</section>
</div>
<style>
section:first-child{
background: #20acda;
}
section:nth-child(2){
background: #00ff5a;
}
section:nth-child(3){
background: #ff0000;
}
.flex-box {
display: -webkit-box;
display: flex-flow: column wrap;
text-align: center;
box-orient: horizontal;
}
.flex-box section {
width: 100%;
-webkit-box-flex: 1;
-moz-box-flex: 1;
box-flex: 1;
-moz-transition: width 0.7s ease-out;
-o-transition: width 0.7s ease-out;
-webkit-transition: width 0.7s ease-out;
transition: width 0.7s ease-out;
}
</style>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment