Sorry for the late comeback.
If the other links you are using internally on the page causes the hash in the URL to change, then yes, what you are describing is correct and the expected behaviour. This trick relies on the hash in the URL, as that is what triggers the CSS :target selector.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.