定位 position | static | 默认值,没有定位 标准流 | |
relative | 相对定位 | ||
absolute | 绝对定位(相对于它的定位父级的位置来定位,如果没有设置定位父级,则相对浏览器窗口来定位) | top、left、right、bottom | |
fixed | 固定定位 脱离文档流(对浏览器窗口来定位) | left、right、top、bottom | |
调整元素定位时重叠层的上下位置 | z-index | 针对(fixed absolute 值越大 显示在最上面) | left、right、top、bottom |
网页元素透明度 | opacity:0.5 | x x值为0~1 | 兼容高版本浏览器 |
filter:1-100 | alpha(opacity=x) | 兼容ie低版本浏览器 9以上无效 |
【第十五篇】定位&z-index&网页元素透明度
于 2022-06-07 18:05:45 首次发布