Default :target with CSS

后端 未结 5 482
深忆病人
深忆病人 2020-11-29 08:42

I have this CSS:


And this HTML:<

5条回答
  •  没有蜡笔的小新
    2020-11-29 09:04

    This seems to be the shortest answer I could find:

    location=location.hash||"#updates-list"

    This simply redirects the user to a valid hash if it is currently nonexistent or empty #.

    ~98% of users have JavaScript enabled, so a JS solution shouldn't really be a problem.

提交回复
热议问题