Justified tabs in Foundation for Apps project

有些话、适合烂在心里 提交于 2019-12-22 17:05:26

问题


I'm looking for a way to achieve full-width/justified tabs in a container in my Foundation app. This is what's happening currently.

In Twitter Bootstrap I can do this and I'm looking for the same type of functionality in Foundation. Is it possible natively?

I'm just using the default tabs structure example right now.


回答1:


Tabs in Foundation use the flexbox model. By default, their flex-grow is 0 (they don't grow to fill up the parent). Change it to 1 and they will. Optionally, you might want to add text-align: center, as now the tab text will be smaller than the tab itself:

div.tabs .tab-item {
    flex-grow: 1;
    text-align: center;
}


来源:https://stackoverflow.com/questions/34053962/justified-tabs-in-foundation-for-apps-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!