繁体   English   中英

如何在jQuery Steps Plugin中更改选项卡的宽度

[英]How to change width of tabs in jQuery Steps Plugin

我正在使用jQuerySteps插件来创建选项卡。 我有四个部分,因此有4个标签,它们完美地工作。 但我希望每个标签具有different percent of width 截至目前,他们每个人得到25%。 但我想手动为它们分配宽度。 我可以通过添加CSS类来实现。 但由于它是一个插件,我无法找到如何创建和呈现<ul> and <li>

以下是插件设置25%宽度的方式。 在此输入图像描述

我的前端代码:

<div id="example-basic">
    <h3>Keyboard</h3>
    <section>
        <p>Try the keyboard navigation by clicking arrow left or right!</p>
    </section>
    <h3>Effects</h3>
    <section>
        <p>Wonderful transition effects.</p>
    </section>
    <h3>Pager</h3>
    <section>
        <p>The next and previous buttons help you to navigate through your content.</p>
    </section>
</div>

JS代码

$("#example-basic").steps({
    headerTag: "h3",
    bodyTag: "section",
    transitionEffect: "slideLeft",
    autoFocus: true
});

题:

如何添加id或类,以便我可以设置first tab : 20 % second tab:40 % and so on宽度first tab : 20 % second tab:40 % and so on

CSS

.wizard>.steps>ul>li:nth-child(1){
    width: 20%;
}
.wizard>.steps>ul>li:nth-child(2){
    width: 40%;
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM