Home>Article>Web Front-end> What does position mean?

What does position mean?

藏色散人
藏色散人 Original
2019-05-14 10:20:24 17173browse

What does position mean?

#position attributeSpecifies the positioning type of the element. This attribute defines the positioning mechanism used to establish the layout of the element. Any element can be positioned, but absolute or fixed elements generate a block-level box, regardless of the type of the element itself. A relatively positioned element is offset from its default position in normal flow.

Value

static

Default value. There is no special positioning, the object follows HTML positioning rules (ignoring top, bottom, left, right or z-index declarations).

absolute

Drag the object out of the document flow, using left, right, top, bottom and other properties relative to the closest one with the most positioning settings The parent object is positioned absolutely. If no such parent object exists, the body object is used. The cascading defined through the z-index attribute

fixed

is not supported. Object positioning follows the absolute method. However, some specifications must be followed

relative

Objects cannot be stacked, but will be offset in the normal document flow based on left, right, top, bottom and other attributes

Related recommendations: "CSS Tutorial"

The above is the detailed content of What does position mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:How to use div layout? Next article:How to use div layout?