I want to reduce the brightness by everything on my page when I press a button, (filter: brightness(50%);) but I want 3 divs to remain the way they were. (The divs are called something along the lines of "popup1", "popup2" and "popup3"
Here's a snippet of my code.
function showPopups()
document.getElementById("bodyID").classList.add("darken");
.darken {
filter: brightness(50%);
}
I have experimented with the :not syntax but haven't found any good websites/other stackoverflow questions that explains it well enough. Thanks in advance!
EDIT My :not method is looking like this right now:
.darken:not(.avoid) {
filter: brightness(50%);
}
while my divs look like this:
<div id="popupID1" class="popup1 avoid">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</div>