如何创建切换标签内容的表格? [英] How to create a table with switching tab content?
本文介绍了如何创建切换标签内容的表格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建一个表格,如下所示:
I want to make a table looks like this:
内部表格不是问题,但不知道如何创建包含商品说明,送货和退货选项卡的外框。一个最小的例子将不胜感激。谢谢。
The inside table is not an issue but don't know how to create the outer frame which includes "Item Descriptions", "Shipping", and "Returns" tabs. A minimal example would be greatly appreciated. Thank you.
推荐答案
您当然可以使用jQuery来解决这个问题。当我需要一些标签时,这就是我所做的。我做了这样的事情:
You could certainly use jQuery to solve this. That's what I did when I needed some tabs. I did something like:
<ul>
<li><a href="#tab-description">Description</a></li>
<li><a href="#tab-shipping">Shipping</a></li>
<li><a href="#tab-returns">Returns</a></li>
</ul>
<div id="tab-description" class="mytabs">
</div>
<div id="tab-shipping" class="mytabs">
</div>
<div id="tab-returns" class="mytabs">
</div>
然后使用一些jQuery制作标签:
and then some jQuery to make the tabs:
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$("#mytabs").tabs({ fx: {opacity: 'toggle'} });
});
</script>
对我来说非常好。只需填写每个div的内容。
works pretty nicely for me. Just fill in whatever your content is in each of the divs.
这篇关于如何创建切换标签内容的表格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文