Skip to content

Instantly share code, notes, and snippets.

@six8
Created September 22, 2011 03:46
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 six8/1233975 to your computer and use it in GitHub Desktop.
Save six8/1233975 to your computer and use it in GitHub Desktop.
HTML for iOS UIWebView that will show unwanted overlay when touching screen edge
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<style>
body {
margin: 0;
padding: 0;
}
*, *:before, *:after {
-webkit-user-select: none;
-webkit-text-size-adjust: none;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-backface-visibility: hidden;
}
.my-div {
position: absolute;
background-color: pink;
width: 320px;
height: 480px;
display: block;
}
</style>
</head>
<body id="body">
<div class="my-div" id="my-div"></div>
<script type="text/javascript">
document.addEventListener('click', function(){}, true);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment