Created
March 12, 2014 14:44
-
-
Save GeorgeTzellis/9508346 to your computer and use it in GitHub Desktop.
scrolling islands
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
/* scrolling islands */body {margin:3em 1em} | |
div {width: 350px; height: 100px; overflow-x: scroll} | |
span {display: inline-block;background: rgba(0,0,255,0.3);} | |
.baseline {background: grey} | |
.flex { | |
display: flex; | |
flex-orient: horizontal; | |
flex-pack: center; | |
flex-align: center; | |
background: rgba(255,200,0,0.3) | |
} | |
.nowrap { | |
white-space: nowrap; | |
background: rgba(255,0,255,0.3); | |
} | |
span{ | |
display: inline-block; | |
width: 150px; | |
height: 44px; | |
background: rgba(255,255,0,.1); | |
white-space: normal; | |
overflow:auto; | |
} |
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
Force a block with inline-block children to scroll horizontally<br> | |
<div class="flex">display: flex<br> | |
<span>Numbers</span><span>0123456789</span><span>٠١٢٣٤٥٦٧٨٩</span><span>०१२३४५६७८९</span><span>o௧௨௩௪௫௬௭௮௯</span><span>౦౧౨౩౪౫౬౭౮౯</span><span>൦൧൨൩൪൫൬൭൮൯</span></div> | |
<div class="nowrap">white-space: nowrap<br> | |
<span><button>31-12-2010</button>, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</span> | |
<span><button>01-01-2011</button>, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</span> | |
<span><button>30-06-2011</button>, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum</span> | |
</div><!-- content to be placed inside <body>…</body> --> |
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
// alert('Hello world!'); |
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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"html"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment