CSS/JavaScript: Make element top-most z-index/top-most modal element
问题 I would like to make an element (e.g. a <div> ) be the top-most layer on the page. My assumption is that the only way I can do this is to specify that the element has a style="z-index:" value that is the maximum the browser allows (int32?). Is this correct? Instead, would it be possible to somehow get the element's z-index whose is highest, and make this <div> 's z-index the [highest element's value] + 1 ? For example: $myDiv.css("z-index", $(document.body).highestZIndex() + 1); How do modal