sách gpt4 ai đã đi

jquery - Bootstrap 选项卡 : Show Element Across All Tabs

In lại 作者:可可西里 更新时间:2023-11-01 13:11:32 26 4
mua khóa gpt4 Nike

我不确定这是否可能,但如果可以的话,那就太棒了。

基本上,我使用的是 Bootstrap 选项卡,我有大约 5 个单独的选项卡。

每个选项卡都提供不同的功能,但是,我希望能够在所有选项卡中显示一个 div。例如,您查看选项卡 1,然后单击选项卡 2,该 div 显示在选项卡 1 和选项卡 2 中。

问题是...我使用的是 ASP.net,所以我不能使用 jQuery 在更改时在选项卡之间移动元素,因为它会弄乱 .Net...

我想的唯一方法是以某种方式可能在我想在所有选项卡中显示的 div 上设置一个超高的 z-index,但是,我相信如果它起源于的选项卡被隐藏,那将不会起作用。

这里有一些代码作为例子:

 




content that is only shown in registration tab

content that can be seen in all tabs



content that is only shown in validation tab




nhập mô tả hình ảnh ở đây

如果您需要任何其他说明,请告诉我。

1 Câu trả lời

如何将您想要的内容移动到 tab-pane 之外的所有选项卡中?

把它放在收盘前 của tab-content .然后就是对两个“盒子”进行样式设置的情况。

HTML



content that is only shown in registration tab



content that is only shown in validation tab


content that can be seen in all tabs


CSS

.tab-pane > div,
.all-tabs-content {
padding: 20px;
background: #ececec;
}

.tab-pane > div {
float: bên trái;
}

.all-tabs-content {
float: right;
padding: 20px;
}

http://jsbin.com/OxoZoRIp/2/edit

关于jquery - Bootstrap 选项卡 : Show Element Across All Tabs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20390334/

26 4 0
可可西里
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi