What should be paid attention to in the use of positioning stacking order in css
This article mainly shows you "what you need to pay attention to in the use of positioning stacking order in css", the content is simple and clear, and I hope it can help you solve your doubts. Let the editor lead you to study and learn "what you need to pay attention to in the use of positioning stacking order in css".
Description
1. The higher the value, the higher the positioning element in the cascading element.
The default property value for z-index is 0.
2. If the value is the same, then follow the writing order and come from behind.
3. The following figures must not be added by units.
4. Only the positioning box has the z-index attribute.
Only relative positioning, absolute positioning, fixed positioning have this attribute, other standard streams, floating, static positioning do not have this attribute, can not specify this attribute.
Example
.box {position: absolute; left: 50%; margin-left:-100px; top: 50%; margin-top:-s100px; width: 200px; height: 200px; background-color: yellow } these are all the contents of the article "what do you need to pay attention to in locating the stacking order in css"? thank you for your reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!