1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title></title> 6 <style> 7 .box{ 8 width: 200px; 9 height: 200px; 10 background-color: red; 11 border: 10px solid black; 12 overflow: hidden; 13 *position: relative; 14 } 15 .content{ 16 width: 400px; 17 height: 400px; 18 background-color: blue; 19 position: relative; 20 } 21 </style> 22 <!-- 23 解决方案: 24 针对ie6、7给父级元素添加相对定位 25 --> 26 </head> 27 <body> 28 <div class="box"> 29 <div class="content"></div> 30 </div> 31 </body> 32 </html>