Last active
August 29, 2015 14:05
-
-
Save sagarpanda/8352dbbd976daa282f34 to your computer and use it in GitHub Desktop.
using flexbox
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"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title>Flexbox Demo</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"> | |
| <link rel="apple-touch-icon" href="/images/home-icon.png"/> | |
| <meta name="apple-mobile-web-app-capable" content="yes" /> | |
| <meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <style type="text/css"> | |
| html,body{margin: 0; padding:0; height: 100%; } | |
| .main-container{ | |
| display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */ | |
| display: -moz-box; /* OLD - Firefox 19- (doesn't work very well) */ | |
| display: -ms-flexbox; /* TWEENER - IE 10 */ | |
| display: -webkit-flex; /* NEW - Chrome */ | |
| display: flex; /* NEW, Spec - Opera 12.1, Firefox 20+ */ | |
| /*-moz-box-orient: vertical; | |
| -webkit-box-orient: vertical; | |
| -webkit-flex-flow: column; | |
| -ms-flex-direction: column; | |
| flex-flow: column;*/ | |
| -moz-box-orient: horizontal; | |
| -webkit-box-orient: horizontal; | |
| -webkit-flex-flow: row; | |
| -ms-flex-direction: row; | |
| flex-flow: row; | |
| height: 100%; | |
| } | |
| .b1{ | |
| -webkit-box-ordinal-group: 2; /* OLD - iOS 6-, Safari 3.1-6 */ | |
| -moz-box-ordinal-group: 2; /* OLD - Firefox 19- */ | |
| -ms-flex-order: 2; /* TWEENER - IE 10 */ | |
| -webkit-order: 2; /* NEW - Chrome */ | |
| order: 2; /* NEW, Spec - Opera 12.1, Firefox 20+ */ | |
| -webkit-box-flex: 1; /* OLD - iOS 6-, Safari 3.1-6 */ | |
| -moz-box-flex: 1; /* Firefox 19- */ | |
| -ms-flex: 1; /* TWEENER - IE 10 */ | |
| -webkit-flex: 1; /* NEW - Chrome */ | |
| flex: 1; /* NEW, Spec - Opera 12.1, Firefox 20+ */ | |
| background: white; | |
| } | |
| .b2{ | |
| -webkit-box-ordinal-group: 1; /* OLD - iOS 6-, Safari 3.1-6 */ | |
| -moz-box-ordinal-group: 1; /* OLD - Firefox 19- */ | |
| -ms-flex-order: 1; /* TWEENER - IE 10 */ | |
| -webkit-order: 1; /* NEW - Chrome */ | |
| order: 1; /* NEW, Spec - Opera 12.1, Firefox 20+ */ | |
| width: 100px; | |
| background: #ccc; | |
| } | |
| .b3{ | |
| -webkit-box-ordinal-group: 3; /* OLD - iOS 6-, Safari 3.1-6 */ | |
| -moz-box-ordinal-group: 3; /* OLD - Firefox 19- */ | |
| -ms-flex-order: 3; /* TWEENER - IE 10 */ | |
| -webkit-order: 3; /* NEW - Chrome */ | |
| order: 3; /* NEW, Spec - Opera 12.1, Firefox 20+ */ | |
| width: 100px; | |
| background: #ccc; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="main-container"> | |
| <div class="b2">Center Pan</div> | |
| <div class="b1">Pan 01</div> | |
| <div class="b3">Pan 02</div> | |
| </div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment