zIndex: Difference between revisions
From MoodleDocs
Damyon Wiese (talk | contribs) No edit summary |
Damyon Wiese (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
The zindex property in CSS determines which page elements overlay all others. Sometimes we want to force an element to be on the very top with javascript. It would be inefficient to scan every node in the DOM to determine the highest z-index in order to make an element with a slightly higher z-index - instead we recommend marking all page elements with a zindex value with the class "moodle-has-zindex". Various javascript modules will search for this class and ensure that the are considered when performing z-index calculations. | The zindex property in CSS determines which page elements overlay all others. Sometimes we want to force an element to be on the very top with javascript. It would be inefficient to scan every node in the DOM to determine the highest z-index in order to make an element with a slightly higher z-index - instead we recommend marking all page elements with a zindex value with the class "moodle-has-zindex". Various javascript modules will search for this class and ensure that the are considered when performing z-index calculations. | ||
{ | {{Template:Javascript}} |
Revision as of 05:36, 2 December 2016
The zindex property in CSS determines which page elements overlay all others. Sometimes we want to force an element to be on the very top with javascript. It would be inefficient to scan every node in the DOM to determine the highest z-index in order to make an element with a slightly higher z-index - instead we recommend marking all page elements with a zindex value with the class "moodle-has-zindex". Various javascript modules will search for this class and ensure that the are considered when performing z-index calculations.