Simple HTML z-index context issue when dragging a div with javascript
I am trying to create a “viewport” effect where I can drag a div around the screen. I want to have controls at the top but I am having issues with the dragged content moving over the controls div.
One-page responsive website z-index problem
<html lang=”ko”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <title></title> <style> body, html { margin: 0; padding: 0; height: 100%; overflow-x: hidden; } section { width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; transition: background-color 0.5s; } #section1 { background-color: #ededee; cursor: pointer; position: relative; } #section2 { height: 100vh; overflow: hidden; background-color: […]