Skip to content

Instantly share code, notes, and snippets.

@johanneseckert
Created April 26, 2013 18:08
Show Gist options
  • Save johanneseckert/5469197 to your computer and use it in GitHub Desktop.
Save johanneseckert/5469197 to your computer and use it in GitHub Desktop.
Splash Screen Aspect Ratio Test
/**
* Splash Screen Aspect Ratio Test
*/
html {
height: 100%;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
font-family: Helvetica, sans-serif;
font-weight: bold;
}
.toast {
position: absolute;
margin: 20px;
padding: 10px;
background: #666;
color: white;
opacity: 0.8;
}
.toast.hidden {
display: none;
}
#toast_resize {
margin-top: 100px;
}
@media only screen and (orientation : landscape) {
html {
background-color: #444;
background-image: url("https://dl.dropboxusercontent.com/u/115270/splash_h.jpg");
}
.toast {
display: none;
}
#toast_landscape {
display: block;
}
}
@media only screen and (orientation : portrait) {
html {
background-color: #444;
background-image: url("https://dl.dropboxusercontent.com/u/115270/splash_v.jpg");
}
.toast {
display: none;
}
#toast_portrait {
display: block;
}
}
<div id="toast_resize" class="toast">Resize your window.</div>
<div id="toast_portrait" class="toast hidden">Portrait Splash</div>
<div id="toast_landscape" class="toast hidden">Landscape Splash</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment