Skip to content

Instantly share code, notes, and snippets.

@tung-dang
Created September 8, 2013 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tung-dang/6486202 to your computer and use it in GitHub Desktop.
Save tung-dang/6486202 to your computer and use it in GitHub Desktop.
CSS Mobile
{
"version": "1.0",
"name": "Your App Name",
"description": "Your new awesome HTML5-based mobile web app!",
"launch_path": "/index.html",
"icons": {
"16": "/img/mylogo-16.png",
"48": "/img/mylogo-48.png",
"128": "/img/mylogo-128.png"
},
"developer": {
"name": "Developer Name",
"url": "http://yourawesomeapp.com"
},
"installs_allowed_from": ["*"],
"locales": {
"es": {
"description": "Su nueva aplicación impresionante Open Web",
"developer": {
"url": "http://yourawesomeapp.com"
}
},
"it": {
"description": "Il vostro nuovo fantastico Open Web App",
"developer": {
"url": "http://yourawesomeapp.com"
}
}
},
"default_locale": "en"
}
// Listen for orientation changes
window.addEventListener("orientationchange", function() {
// Announce the new orientation number
console.log(window.orientation);
// 0 means portrait, 90 means landscape rotated to the left, -90 means landscape rotated to the right
}, false);
// When ready...
window.addEventListener("load",function() {
// Set a timeout...
setTimeout(function(){
// Hide the address bar!
window.scrollTo(0, 1);
}, 0);
});
<!-- Launch the Photo Choose -->
<input type="file" name="image" accept="image/*" capture>
/* lets try a lighter blue... */
html {
-webkit-tap-highlight-color: rgba(201, 224, 253, 0.8);
}
/* for some buttons or links, simply hide the selection color all together */
.no-highlight {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* don't let iOS' "actions" dialog to come up when element is touch/held */
.prevent-action {
-webkit-touch-callout: none;
}
/* no dragging of element at all */
.content p.no-drag {
-webkit-user-drag: none;
}
/* drags entire element, not the text/selection */
.sidebar div.element-drag {
-webkit-user-drag: element;
}
/* change the character used to hide user passwords */
input[type="password"] {
-webkit-text-security: square;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment