只要1个wrapper指定高宽度,再用绝对定位,设置left和top为负值即可。
1 <style type="text/css">
2 .wrapper
3 { width:670px; height:350px; margin:100px 30px; overflow:hidden; position:relative; }
4 .iframe { width:1024px;height:768px; position:absolute; top:-300px; left:-300px; }
5 </style>
6 <div class="wrapper">
7 <iframe class="iframe" src="http://www.baidu.com" scrolling="no" frameborder="0">
8 </iframe>
9 </div>