python - 如何在烧瓶中打开 HTML 页面中的特定部分
问题描述
我正在做一个烧瓶项目。我的主页在导航栏中包含关于、问题和联系人。index.html 包含导航栏的内容。关于、问题和联系部分在同一页上。因此,每当单击这些时,页面都会滚动到相应的部分
<li class="nav-item">
<a class="nav-link aaa height" href="#about">About</a>
<a class="nav-link aaa height" href="#problem">Problems</a>
<a class="nav-link aaa height" href="#contact">Contact</a>
</li>
现在在我的问题页面中,我有相同的导航栏,但是当我单击关于按钮时,它显示我找不到 URL。这是我的 python-flask 代码。
@app.route("/en/index#problem")
def index_about():
return render_template('index.html#about')
如何从其他页面路由到关于部分的索引页面?
解决方案
推荐阅读
- ajax - 遍历数组并发送多个ajax请求的正确方法是什么
- javascript - 检查今天的日期是否在其他两个日期之间而不使用年份
- javascript - 动态更新被点击的复选框的值
- mongodb - 在 mongodb 中对组的结果进行分组
- dcpu-16 - dcpu-16 有堆栈还是堆栈指针仅指向 ram 地址?(编写 dcpu-16 仿真器)
- latex - 狮身人面像前导码无法加载到乳胶中
- php - Redis 会话回调错误
- python - Unity Hololens Development 中的 Python 图像处理
- python - 如何将python源文件中的字符串转换为多行字符串?
- scala - Scala 类型不匹配 - 发现:所需单位:数组 [字符串]