I'm struggling with a CSS challenge:
#box:target {
box-shadow: 0px 0px 20px black;
}
Here's the scenario: On my "parent" page (page1), I have a button that redirects you to another page called "page2.html#box". This causes the #box:target
styles to be applied when the page loads. However, on page1, there is also another button that triggers a function to change the properties of #box:target
. I've been searching for a solution in javascript to achieve this without using :focus
.