📜  标题下方的页面锚标记 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:01.538000             🧑  作者: Mango

代码示例1
// For modern browsers, just add the CSS3 :target selector to the page. 
// This will apply to all the anchors automatically.
// ref: http://stackoverflow.com/a/21707103/6220029

:target {
  display: block;
  position: relative;
  top: -120px; 
  visibility: hidden;
}