Αποτελέσματα Αναζήτησης
Example. Set the z-index for an image, so that it is displayed behind the text: img { position: absolute; left: 0px; top: 0px; z-index: -1; } Try it Yourself » More "Try it Yourself" examples below. Definition and Usage. The z-index property specifies the stack order of an element.
- Tryit Editor V3.3
The W3Schools online code editor allows you to edit code and...
- Word-Wrap
Well organized and easy to understand Web building tutorials...
- CSS Inherit Keyword
Well organized and easy to understand Web building tutorials...
- zIndex Property
The zIndex property sets or returns the stack order of a...
- Tryit Editor V3.3
The z-index Property. When elements are positioned, they can overlap other elements. The z-index property specifies the stack order of an element (which element should be placed in front of, or behind, the others). An element can have a positive or negative stack order:
The zIndex property sets or returns the stack order of a positioned element. An element with greater stack order (1) is always in front of another element with lower stack order (0). Tip: A positioned element is an element with the position property set to: relative, absolute, or fixed.
The CSS z-index property is used to control the stacking order of the positioned elements. In this tutorial, you will learn about the CSS z-index property with the help of examples.
25 Μαΐ 2023 · The z-index attribute lets you adjust the order of the layering of objects when rendering content. In CSS 2.1, each box has a position in three dimensions. In addition to their horizontal and vertical positions, boxes lie along a "z-axis" and are formatted one on top of the other.
The css property z-index only works on positioned elements, meaning elements must be position absolute, fixed or relative in order for the z-index property to take effect. The higher the z-index the closer to the front it will appear.
27 Σεπ 2024 · Syntax. z-index: auto | number | initial | inherit; Property values. These are the values of the z-index property and their descriptions: Examples of CSS z-index Property. Example 1: Layering Elements with z-index. In this example, we demonstrate the z-index property.