Skip to content

Instantly share code, notes, and snippets.

@shanelau
Created May 8, 2016 08:27
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 shanelau/3cd8ef369cb7bc184d1c5f93c308c49f to your computer and use it in GitHub Desktop.
Save shanelau/3cd8ef369cb7bc184d1c5f93c308c49f to your computer and use it in GitHub Desktop.
full screen iframe
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="http://www.softwhy.com/" />
<title>Asyncing</title>
<style>
body{
margin:0;
padding:0;
overflow-y:hidden
}
</style>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script type="text/javascript">
window.onerror=function(){return true;}
$(function(){
headerH = 0;
var h=$(window).height();
$("#iframe").height((h-headerH)+"px");
});
</script>
</head>
<body>
<iframe id="iframe" frameborder="0" src="http://wan.meizu.com" style="width:100%;"></iframe>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment