如何在Bootstrap Nav Tab-Pane中使用链接?

发布于 2025-02-13 00:26:27 字数 2204 浏览 0 评论 0原文

我在NAV Tab Pane中的链接遇到了麻烦。由于某种原因,链接在此之后添加了域名,然后在我的HREF中加入链接:

https://www.edmontonyouth.com/” www.edmontonyouth.com/attractions/edmonton-corn-maze”

我在做什么错?

如果您想查看我正在使用的网页,并自己查看它在做什么,您可以在 www.edmontonyouth.com/places-to-visit-in---in-edmonton

我正在考虑尝试一个列表组如果其工作方式有所不同,因为也许问题是它是NAV-PILL。

这是我的代码的示例:

<div class="d-flex align-items-start">
  <div class="nav flex-column nav-pills me-3" id="v-pills-tab" role="tablist" aria-orientation="vertical">
    <button class="nav-link active" id="v-pills-home-tab" data-bs-toggle="pill" data-bs-target="#v-pills-home" type="button" role="tab" aria-controls="v-pills-home" aria-selected="true">
      Edmonton Corn Maze
    </button>
  </div>

  <div class="tab-content" id="v-pills-tabContent">
    <div class="tab-pane fade show active text-center" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">
      <img src="images/edmonton-corn-maze.jpg" class="mb-3" style="height: 200px" alt="The Edmonton Corn Maze photo" title="The Edmonton Corn Maze" />

      <p>
        The Edmonton Corn Maze is a great attraction for a day outside. The maze changes every year, but it has oh so much to do! There is stuff to do for the little and bigger kids, making it a great place for kids of all ages.
      </p>

      <a href="www.edmontonyouth.com/attractions/edmonton-corn-maze" class="btn btn-outline-primary me-2" title="The Edmonton Corn Maze" alt="The Edmonton Corn Maze Link">
        Link to our Review
      </a>

      <a href="https://www.edmontoncornmaze.ca/" class="btn btn-outline-primary" title="The Edmonton Corn Maze" alt="The Edmonton Corn Maze Link to Their Website">
        Link to Their Website
      </a>
    </div>
  </div>
</div>

I am having trouble with my links in a nav tab pane. For some reason the links are adding the domain name and then including the link in my href after like this:

https://www.edmontonyouth.com/”www.edmontonyouth.com/attractions/edmonton-corn-maze”

What am I doing wrong?

If you'd like to check out the webpage I'm using on and see for yourself what it is doing you can find it on www.edmontonyouth.com/places-to-visit-in-edmonton

I am considering trying a list group instead to see if it works differently, since maybe the issue is that its a nav-pill.

Here is sample of my code:

<div class="d-flex align-items-start">
  <div class="nav flex-column nav-pills me-3" id="v-pills-tab" role="tablist" aria-orientation="vertical">
    <button class="nav-link active" id="v-pills-home-tab" data-bs-toggle="pill" data-bs-target="#v-pills-home" type="button" role="tab" aria-controls="v-pills-home" aria-selected="true">
      Edmonton Corn Maze
    </button>
  </div>

  <div class="tab-content" id="v-pills-tabContent">
    <div class="tab-pane fade show active text-center" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">
      <img src="images/edmonton-corn-maze.jpg" class="mb-3" style="height: 200px" alt="The Edmonton Corn Maze photo" title="The Edmonton Corn Maze" />

      <p>
        The Edmonton Corn Maze is a great attraction for a day outside. The maze changes every year, but it has oh so much to do! There is stuff to do for the little and bigger kids, making it a great place for kids of all ages.
      </p>

      <a href="www.edmontonyouth.com/attractions/edmonton-corn-maze" class="btn btn-outline-primary me-2" title="The Edmonton Corn Maze" alt="The Edmonton Corn Maze Link">
        Link to our Review
      </a>

      <a href="https://www.edmontoncornmaze.ca/" class="btn btn-outline-primary" title="The Edmonton Corn Maze" alt="The Edmonton Corn Maze Link to Their Website">
        Link to Their Website
      </a>
    </div>
  </div>
</div>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千秋岁 2025-02-20 00:26:27

Soo,我刚刚意识到问题是我链接周围的双引号。它们与适当的编码略有不同,因为它们略微弯曲(将表情符号插入面部)。我不知道我是如何管理的

Soo I just realized the problem was with the double quotes around my links. They were slightly different than the proper one for coding, as they are curved slightly (insert emoji with hand in face). I don't know how I managed that

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文