CSS布局定位:position_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:26:18
Original
816 people have browsed it

position:属性规定元素的定位类型。

取值:static | absolute | fixed | relative

 

static : 默认值。无特殊定位 。对象遵循HTML定位规则。

 

absolute(绝对定位)  : 将对象从文档流中拖出(可层叠)。用left, right, top, bottom等属性相对于其最接近的一个最有定位设置的父对象进行绝对定位。如果不存在这样的父对象,则依照body对象绝对定位。

 

fixed(固定定位,一种特殊的绝对定位) :相对于浏览器窗口。可以根据left, right, top, bottom等属性进行定位。遵从绝对定位方式。

 

relative(相对定位) : 对象不层叠。可以根据left, right, top, bottom等属性在正常文档流中进行定位。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!