使用语义UI将垂直菜单附加到细分

时间:2016-11-10 14:16:06

标签: css semantic-ui

如何使用Semantic-UI CSS框架将垂直菜单附加到细分市场?使用文档中提供的标记时,内容和菜单之间将存在边距(由网格填充产生)。如果不使用网格,则边框不合适。

    <div class="ui grid">
    <div class="row">
        <div class="sixteen wide column">
            <!-- Overlapping border -->
            <div class="ui horizontal segments">
                <div class="ui vertical tabular menu">
                    <a class="active item">Bio</a>
                    <a class="item">Pics</a>
                    <a class="item">Companies</a>
                    <a class="item">Links</a>
                </div>
                <div class="ui segment">
                    This is an stretched grid column. This segment will always match the tab height
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <!-- Margin between the elements -->
        <div class="four wide column">
            <div class="ui vertical fluid tabular menu">
                <a class="active item">Bio</a>
                <a class="item">Pics</a>
                <a class="item">Companies</a>
                <a class="item">Links</a>
            </div>
        </div>
        <div class="twelve wide stretched column">
            <div class="ui segment">
                This is an stretched grid column. This segment will always match the tab height
            </div>
        </div>
    </div>
    <div class="row">
        <!-- Margin between the elements -->
        <div class="four wide column">
            <div class="ui vertical fluid menu">
                <a class="active item">Bio</a>
                <a class="item">Pics</a>
                <a class="item">Companies</a>
                <a class="item">Links</a>
            </div>
        </div>
        <div class="twelve wide stretched column">
            <div class="ui segment">
                This is an stretched grid column. This segment will always match the tab height
            </div>
        </div>
    </div>
    <div class="row">
        <div class="sixteen wide column">
            <!-- Overlapping border -->
            <div class="ui horizontal segments">
                <div class="ui vertical menu">
                    <a class="active item">Bio</a>
                    <a class="item">Pics</a>
                    <a class="item">Companies</a>
                    <a class="item">Links</a>
                </div>
                <div class="ui segment">
                    This is an stretched grid column. This segment will always match the tab height
                </div>
            </div>
        </div>
    </div>
</div>

JSFiddle

我希望垂直菜单附加到片段(就像使用水平菜单时一样)。 Tabular Menu

1 个答案:

答案 0 :(得分:1)

我认为你可以制作一个小的重写css类来修改默认的grid uimenu类中的一些东西来制作你想要的东西。这是一个代码示例,只有第一个网格ui示例:http://codepen.io/Nasir_T/pen/dOGGro