首頁  >  文章  >  web前端  >  【CSS BUG】IE6奇数宽position定位_html/css_WEB-ITnose

【CSS BUG】IE6奇数宽position定位_html/css_WEB-ITnose

WBOY
WBOY原創
2016-06-24 12:34:181065瀏覽

问题描述:有嵌套的两个块定位,盒子宽为奇数时在IE6里有1px的bug。

IE6 和 FF 的表现如下

示例代码:

<!doctype html><html><head><meta charset="UTF-8"><title></title><style type="text/css">    * { margin: 0; padding: 0; }    .box { position: relative; width: 401px; height: 200px; background-color: blue; }    .inner { position: absolute; right: 0; top: 0; width: 100px; height: 200px; background-color: red; }</style></head><body><div class="box">    <div class="inner"></div></div></body></html>

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn