twitter 引导标签:内容窗格中的链接不起作用

编程入门 行业动态 更新时间:2024-10-26 02:28:57
本文介绍了twitter 引导标签:内容窗格中的链接不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我在这里有一个工作标签实例并准备了一个 jsfiddle(不知何故标签在这里无法正常工作,但链接问题仍然存在):http://jsfiddle/Gyrga/6/

选项卡窗格中的链接不再起作用,也不会转到 URL http://somewhere .. 为什么?我忽略了什么?

谢谢!

解决方案

在使用标签页时,需要进行以下操作(根据文档)

<div class="tab-pane active" id="home">...</div><!-- 等等-->

但在您的示例中,您将 data-toggle="tab" 放在 .tab-pane 上,这会破坏内部的链接.

只需删除此属性并将其放在实际切换选项卡的链接上即可.这样你甚至不需要 JavaScript 来激活它们.

工作演示(jsfiddle)

i have a working tabs instance here and prepared a jsfiddle (somehow the tabs don't work correctly here, but the link issue is still present): http://jsfiddle/Gyrga/6/

The links in the tab panes don't work anymore and don't go to the URL http://somewhere at all.. Why? What did I overlook?

Thanks!

解决方案

When you use the tabs, you need to do the following (according to the doc)

<a href="#home" data-toggle="tab">Home</a>
<!-- etc -->

<div class="tab-content">
    <div class="tab-pane active" id="home">...</div>
    <!-- etc -->
</div>

But in your example, you put the data-toggle="tab" on the .tab-pane which breaks the links inside.

Just remove this attribute and put it on the link which actually toggles the tab. That way you won't even need the JavaScript to activate them.

Working demo (jsfiddle)

这篇关于twitter 引导标签:内容窗格中的链接不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-05-01 10:53:49,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不起作用   窗格   标签   链接   内容

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!