Skip to content

Instantly share code, notes, and snippets.

@jarkkosyrjala
Last active December 21, 2015 22:28
Show Gist options
  • Save jarkkosyrjala/6375059 to your computer and use it in GitHub Desktop.
Save jarkkosyrjala/6375059 to your computer and use it in GitHub Desktop.
Simple html template with viewport and css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta http-equiv="X-UA-Compatible" content="chrome=1, IE=edge">
<title>Title</title>
<style type="text/css">
html, body {
height: 100%;
}
body {
margin: 0;
padding: 0;
}
/*
Disable the default callout when you touch and hold a touch target.
and disable user from selecting content (dragging).
*/
*:not(input,textarea) {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
</style>
<script>
document.body.addEventListener("touchmove", function(e) {
e.preventDefault();
},false);
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment