<a class="target-fix" name="a-<?php $a->id(); ?>"></a>
<artivle>主体内容...</article>
将锚点进行偏移,并隐藏占位:
.target-fix {
position: relative;
top: -44px; // 偏移值
display: block;
height: 0;
overflow: hidden;
}
<a class="target-fix" name="a-<?php $a->id(); ?>"></a>
<artivle>主体内容...</article>
.target-fix {
position: relative;
top: -44px; // 偏移值
display: block;
height: 0;
overflow: hidden;
}