skip to Main Content

Html – Button created from javascript is not clickable

HTML <div class="wrapper"> <div class="bg-backdrop"></div> </div> CSS .wrapper { position: relative; z-index: 10; } .bg-backdrop { position: fixed; top: 0px; right: 0px; bottom: 0px; left: 0px; background-color: black; opacity: 0.2; } JS const button = document.createElement("button") const subject = document.querySelector(".bg-backdrop")…

VIEW QUESTION
Back To Top
Search