Created
June 16, 2016 16:01
-
-
Save Restoration/a23b9d505fc0a764cfc92e95b71e07fa to your computer and use it in GitHub Desktop.
FlexibleBox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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