<a class="target-fix" name="a-<?php $a->id(); ?>"></a>
<artivle>主体内容...</article>

 

将锚点进行偏移,并隐藏占位:

 

.target-fix {
position: relative;
top: -44px; // 偏移值
display: block;
height: 0;
overflow: hidden;
}

相关文章:

  • 2022-12-23
  • 2021-12-15
  • 2021-11-13
  • 2021-12-15
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-03
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
  • 2022-02-03
  • 2021-11-28
  • 2022-12-23
相关资源
相似解决方案