1img {
2 position: absolute;
3 /*position: relative;
4 //position: fixed;*/
5 left: 0px;
6 top: 0px;
7 z-index: -1;
8}
9
10The z-index property specifies the stack order of an element.
1/* The z-index CSS property sets the z-order of a positioned element and its
2descendants or flex items. Overlapping elements with a larger z-index cover
3those with a smaller one. */
4
5/* Keyword value */
6z-index: auto;
7
8/* <integer> values */
9z-index: 0;
10z-index: 3;
11z-index: 289;
12z-index: -1; /* Negative values to lower the priority */
13
14/* Global values */
15z-index: inherit;
16z-index: initial;
17z-index: unset;
1#nav {
2 position: fixed;
3 ...
4 z-index: 2;
5}
6#main {
7 position: absolute;
8 ...
9 z-index: 1;
10}