absolutely positioned element and percentage width

absolutely positioned element and percentage width


Firefox 截图


IE6截图


Definition of 'containing block': ... 4. If the element has 'position: absolute', the containing block is established by the nearest ancestor with a 'position' of 'absolute', 'relative' or 'fixed'...

( CSS2.1 10.1).
定义包含块:如果元素是绝对定位的 ("position: absolute") ,它的包含块是离它最近的 相对定位 ,绝对定位,或 固定定位的元素 (a 'position' of 'absolute' ,'relative' or 'fixed')。

Note: For absolutely positioned elements whose containing block is based on a block-level element, the percentage is calculated with respect to the width of the padding box of that element. This is a change from CSS1, where the percentage width was always calculated with respect to the content box of the parent element ...

( CSS2.1 10.2).

注意:对绝对定位来说它的包含块是基于块级元素 ( block-level element )的 ,百分比是参照那个元素的 padding box 计算的。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值