I am working with an HTML script that looks like this:
<html>
<head></head>
<body>
<div id="div1"></div>
<div id="div2"></div>
</body>
</html>
Now, I need to be able to access the div elements based on the URL. For example, if the URL is:
example.com#div1
I want to hide div2
. On the other hand, if the URL is:
example.com#div2
then I want to hide div1
Is it possible to achieve this using CSS?