📅  最后修改于: 2021-01-02 06:13:39             🧑  作者: Mango
Framework7选项卡是一组按逻辑分组的内容,可帮助您在它们之间快速移动并像手风琴一样节省空间。
请参见Framework7选项卡的布局:
... The content for Tab 1 goes here ...
... The content for Tab 2 goes here ...
这里:
如果希望用户可以在选项卡之间切换,请在选项卡布局中使用某些控制器。为此,您应该使用tab-link类和href属性等于目标tab的id属性创建链接(标记):
<!-这里的链接用于激活第一个选项卡,具有与第一个选项卡(tab1)的id属性相同的href属性(#tab1)->
<!-这里的链接用于激活第二个选项卡,具有与第二个选项卡(tab2)的id属性相同的href属性(#tab2)->
如果您具有单个选项卡链接,并且想要在多个选项卡之间切换,请使用类,而不要使用ID和data-tab属性。
tab-link的data-tab属性包含目标选项卡的CSS选择器。
Framework7中使用了不同类型的选项卡:
Index | Tab Type | Description |
---|---|---|
1) | Inline Tabs | Inline tabs are sets of grouped in inline that allow you to quickly flip between them. |
2) | Switch Tabs From Navbar | We can place tabs in navigation bar that facilitate you to flip between them. |
3) | Switch Views From Tab Bar | Single tab can be used to switch between views with its own navigation and layout. |
4) | Animated Tabs | You can use simple transition (animation) to switch tabs. |
5) | Swipeable Tabs | You can create swipeable tabs with simple transition by using the tabs-swipeable-wrap class for the tabs. |
6) | Tabs JavaScript Events | JavaScript events can be used when you are working with JavaScript code for the tabs. |
7) | Show Tab Using JavaScript | You can switch or show the tab using JavaScript methods. |