JavaScript: The Definitive Guide, Sixth Editio javaScript权威指南(第6版) pdf 文字版-文字版, javascript电子书, 和javascript 有关的电子书: The third dimension: z-index The third dimension: z-index

You’ve seen that the left, top, right, and bottom properties can specify the X and Y coordinates of an element within the two-dimensional plane of the containing element. The z-index property defines a kind of third dimension: it allows you to specify the stacking order of elements and indicate which of two or more overlapping elements is drawn on top of the others. The z-index property is an integer. The default value is zero, but you may specify positive or negative values. When two or more elements overlap, they are drawn in order from lowest to highest z-index; the element with the highest z-index appears on top of all the others. If overlapping elements have the same z-index, they are drawn in the order in which they appear in the document so that the last overlapping element appears on top.

Note that z-index stacking applies only to sibling elements (i.e., elements that are children of the same container). If two elements that are not siblings overlap, setting their individual z-indexproperties does not allow you to specify which one is on top. Instead, you must specify the z-index property for the two sibling containers of the two overlapping elements.

友情链接It题库(| 版权归yishouce.com所有| 友链等可联系|粤ICP备16001685号-1