gpt4 book ai didi

bootstrap-4 - Bootstrap 4卡导航

转载 作者:行者123 更新时间:2023-12-03 23:42:35 25 4
gpt4 key购买 nike

在Bootstrap 4 beta中,您可以向卡组件添加导航。
https://getbootstrap.com/docs/4.0/components/card/#navigation

但是,实际上没有工作示例可以显示如何在卡中的不同标签之间进行切换。

例如,这对我不起作用。我也添加了javascript文件。

<div class="card">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs">
<li class="nav-item">
<a class="nav-link active" href="#foo">Foo</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#bar">Bar</a>
</li>
</ul>
</div>
<div class="card-body">
<div class="tab-content">
<div class="tab-pane" id="foo">FOO</div>
<div class="tab-pane" id="bar">BAR</div>
</div>
</div>
</div>

最佳答案

这样尝试

<div class="card ">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs pull-right" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab" aria-controls="profile" aria-selected="false">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" id="contact-tab" data-toggle="tab" href="#contact" role="tab" aria-controls="contact" aria-selected="false">Contact</a>
</li>
</ul>
</div>

<div class="card-body">
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">...</div>
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">...</div>
<div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">...</div>
</div>
</div>
</div>


了解更多信息 https://getbootstrap.com/docs/4.0/components/navs/

关于bootstrap-4 - Bootstrap 4卡导航,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47148233/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com