Created
July 22, 2013 16:14
-
-
Save jklm313/6055177 to your computer and use it in GitHub Desktop.
Untitled
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
| * { | |
| position: relative; | |
| box-sizing: border-box; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| html { | |
| background: white; | |
| } | |
| body { | |
| background: #222; | |
| text-align: center; | |
| overflow: hidden; | |
| } | |
| .container { | |
| display: inline-block; | |
| transform-origin: 50% 50%; | |
| margin-top: -50%; | |
| transform: rotate(-90deg) translateX(-50%); | |
| border: 3px solid red; | |
| } |
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
| <div class='container'></div> |
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
| var supportsOrientationChange = 'onorientationchange' in window, orientationEvent = supportsOrientationChange ? 'orientationchange' : 'resize'; | |
| var $container = document.getElementsByClassName('container')[0]; | |
| $container.style.width = window.innerHeight + 'px'; | |
| $container.style.height = window.innerWidth + 'px'; | |
| window.addEventListener(orientationEvent, function() { | |
| $container.style.width = window.innerHeight + 'px'; | |
| $container.style.height = window.innerWidth + 'px'; | |
| }, false); |
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":"separate","fontsize":"100","seethrough":"1","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment