HTML锚点定位偏移

参照 stackoverflow 的做法,在主体内容前加一个暗锚

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

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

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