How to keep :active css style after clicking an element

后端 未结 5 927
忘了有多久
忘了有多久 2020-12-03 01:52

I use anchor as my site navigation.

about
<
5条回答
  •  南笙
    南笙 (楼主)
    2020-12-03 02:21

    The :target-pseudo selector is made for these type of situations: http://reference.sitepoint.com/css/pseudoclass-target

    It is supported by all modern browsers. To get some IE versions to understand it you can use something like Selectivizr

    Here is a tab example with :target-pseudo selector.

提交回复
热议问题