show display:none div after refresh

前端 未结 5 922
滥情空心
滥情空心 2020-12-17 00:34

Don\'t know how to put the question title correctly! I have a div that is displayed by button click. The problem is that if user goes to next page(by clicking another button

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-17 00:54

    Using @DustinPoissant's answer, I've made something a little bit easier.

    You can use the selector :target to style the element, and save you some code.

    Like this:

    
    
    
    something

    The :target selector will match when the 'hash' on your address matches the id of that element.

提交回复
热议问题