本文介紹了如何使 Zurb Foundation 頂部欄導航居中?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我的網(wǎng)站上的頂部導航欄左對齊如下:
The top bar nav on my site is left aligned like this:
| Home | aveoTSD | Silent Nite |
我想像這樣將頂部欄導航居中:
I would like to center the top bar nav like this:
| Home | aveoTSD | Silent Nite |
將它與帶有示例"文本的紅色條完全一樣居中.
Center it exactly like the red bar with "Example" text.
這里是我的css.
推薦答案
您可以通過將其添加到您的 CSS 來實現(xiàn)(最好刪除沖突的樣式):
You can do it by adding this to your CSS (and preferably removing conflicting styles):
.top-bar-section ul {display: table; margin: 0 auto;}
.top-bar-section ul li {display: table-cell;}
這篇關于如何使 Zurb Foundation 頂部欄導航居中?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!