标签:
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title></title> 6 <style> 7 .box{ 8 width: 308px; 9 height: 308px; 10 background-color: red; 11 position: absolute; 12 } 13 .content{ 14 width: 100px; 15 height: 100px; 16 background-color: blue; 17 position: absolute; 18 right: 0; 19 bottom: 0; 20 } 21 </style> 22 <!-- 23 解决方案: 24 避免父级宽高出现奇数 <IE6否则会出出现一个像素的偏差也就是子集不会紧紧地贴着父亲> 25 --> 26 </head> 27 <body> 28 <div class="box"> 29 <div class="content"></div> 30 </div> 31 </body> 32 </html>
IE6下绝对定位元素父级宽高是奇数,绝对定位元素的right和bottom值会有1个像素的偏差
标签:
原文地址:http://www.cnblogs.com/hduhdc/p/5236070.html