传递_anchor
关键字以url_for
将锚添加到生成的URL。
导航菜单:
<a href="{{ url_for('.stuff', _anchor='exactlocation') }}">Go to specific id on suff page</a>
烧瓶路线:
@main.route('/')
def stuff():
return render_template('stuff.html')
stuff.html
:
...
<section id="exactlocation">
...