如何将标签置于尖头标签面板中?

时间:2014-03-04 17:00:40

标签: spry

有没有办法将spry标签面板的标签放在中间?

     +------+------+
     |Tab  1|Tab 2 |
     +------+------+
+-----------------------+
|         panel         |
|                       |
+-----------------------+

目前他们默认在左边。

1 个答案:

答案 0 :(得分:0)

根据这个例子: http://adobe.github.io/Spry/samples/tabbedpanels/tabbed_panel_sample.htm

<ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab" tabindex="0">Tab 1</li>
    <li class="TabbedPanelsTab" tabindex="0">Tab 2</li>
    <li class="TabbedPanelsTab TabbedPanelsTabSelected" tabindex="0">Tab 3</li>
    <li class="TabbedPanelsTab" tabindex="0">Tab 4</li>
</ul>

只需处理css,添加这些规则以使标签菜单居中(我用firebug动态尝试):

.TabbedPanelsTabGroup{
    text-align: center;
}
.TabbedPanelsTab{
    display: inline-block;
    float: none;
}