html - html 导航标签 - 单击页面上的任意位置会打开链接问题
问题描述
我有这段 HTML。
<h4><a href="#">MERN-Shopping-List</a></h4>
如果我们忽略 ,#
因为我知道放在那里的任何链接只会导致我能够单击页面上的任何位置并转到它,这不是我想要实现的。
这段 HTML 在里面:
<div class="row align-items-center no-gutters mb-4 mb-lg-5">
<div class="col-xl-8 col-lg-7">
<img class="img-fluid mb-3 mb-lg-0" src="img/mern.png" alt="">
</div>
<div class="col-xl-4 col-lg-5">
<div class="featured-text text-center text-lg-left">
<h4><a href="#">MERN-Shopping-List</a></h4>
<p class="text-black-50 mb-0">This application allows you to register, log in, and log out users and be able to add and delete items to the list. This shopping list was built with the MERN stack with Redux.</p>
</div>
</div>
</div>
我已将锚标记放在正确的h4
标记内,那么为什么允许我单击任意位置并且仍然能够转到该链接?
我还有其他h4
标签也需要附加单独的链接。
解决方案
推荐阅读
- cqrs - CQRS 和最终一致性
- pandas - 如何从熊猫数据框的两个日期时间列中获取持续时间?
- python-gstreamer - GStreamer Python Playbin 多个视频过滤器
- c# - _layout.cshtml 模板中的动态数据可用于使用此模板的所有页面
- apache-spark - 为什么有些运算符返回 DataFrame 而有些运算符返回 Dataset?
- jquery - 使用 jQuery 调用按钮不会收到 JSON 响应
- pandas - Pandas read_csv 从一年中删除前 2 位数字
- c# - WPF 窗口所有权在 50 年代窗口被打破
- php - PHP数据库查询
- jmeter - 如果循环计数大于 1,Beanshell 断言返回不一致的结果