What does position mean?

藏色散人
Release: 2020-09-16 11:15:53
Original
17374 people have browsed it

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!

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