合规国际互联网加速 OSASE为企业客户提供高速稳定SD-WAN国际加速解决方案。 广告
[CSS参考手册](http://css.doyoe.com/)»[属性列表](#)»[定位属性](#)» 相关内容: [**其它定位属性参考**选择其它项](#) - [position](#) - [z-index](#) - [top](#) - [right](#) - [bottom](#) - [left](#) # position - **版本:CSS2** - 继承性:无 ### 语法: **position**:static | relative | absolute | fixed **默认值**:static ### 取值: static:无特殊定位,对象遵循正常文档流。[top](#),[right](#),[bottom](#),[left](#)等属性不会被应用。relative:对象遵循正常文档流,但将依据[top](#),[right](#),[bottom](#),[left](#)等属性在正常文档流中偏移位置。absolute:对象脱离正常文档流,使用[top](#),[right](#),[bottom](#),[left](#)等属性进行绝对定位。而其层叠通过[z-index](#)属性定义。fixed:对象脱离正常文档流,使用[top](#),[right](#),[bottom](#),[left](#)等属性以窗口为参考点进行定位,当出现滚动条时,对象不会随着滚动。*IE6及以下不支持此参数值* ### 说明: **检索对象的定位方式。** - 对应的脚本特性为**position**。 ### 兼容性: - 浅绿 = 支持 - 红色 = 不支持 - 墨绿 = 部分支持 - 橙色 = 实验性质 <table class="gdataform"><thead><tr><th><a href="#browser" title="查看本文档测试时所用浏览器版本">支持版本</a>\类型</th> <th><span class="browser-ie">IE</span></th> <th><span class="browser-firefox">Firefox</span></th> <th><span class="browser-safari">Safari</span></th> <th><span class="browser-chrome">Chrome</span></th> <th><span class="browser-opera">Opera</span></th> </tr></thead><tbody><tr><th>较早版本</th> <td class="partsupport">6.0 <sup><a href="#support1">#1</a></sup></td> <td rowspan="2" class="support">4.0</td> <td rowspan="2" class="support">5.1</td> <td rowspan="2" class="support">13.0</td> <td rowspan="2" class="support">11.50</td> </tr><tr><th>较新版本</th> <td class="support">7.0</td> </tr></tbody></table> 1. IE6及更早浏览器不支持position属性的fixed参数值。 ### 示例: 水平垂直居中的对象 Copyright © 2006-2012 [Doyoe](http://www.doyoe.com/). All Rights Reserved