About the element stacking method

1. Introduction

    1. Although the web page is a plane, in fact, the web page is a three-dimensional structure. It uses the x-axis and y-axis to set the position, and uses the z-axis to set the order of the layers where the elements are located.

   2. Under normal circumstances, the z-index property of an element is inactive, that is, under normal circumstances, it is invalid. Only "position: relative;" and "position: absolute;" are used, as well as "position: relative;" fixed;" will be activated,

2. Grammar

z-index: value;
If it is a positive number, it is closer to the user. If it is a negative number, it is further away from the user, that is, the bottom. The default is 0.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324931556&siteId=291194637