<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
body{
margin:0;
padding:0;
overflow: hidden;
}
</style>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
changeWH();
});
function changeWH(){
$("#myiframe").height($(document).height());
$("#myiframe").width($(document).width());
}
window.οnresize=function(){
changeWH();
}
</script>
</head>
<body>
<iframe src="http://www.taobao.com" id="myiframe" frameborder="0">
</iframe>
</body>
</html>
之前要在一个页面展示另外一个页面的内容,就用了iframe,网上看了好多人写的最后自己又改了些写的这个,结果同学告诉我有个大神直接用css实现的,我都惊呆了~