close
♣梅問題‧教學網【Minwt】♣ |
Bootstrap導覽列Navbar中的選單自動齊左、齊右、居中 Posted: 10 Aug 2016 03:00 PM PDT ![]() Step1 當要齊右時,只需在navbar-nav的ul中加入navbar-right。 ![]() Step2 這時選單就會向右靠齊。 ![]() Step3 當要齊左時,再將原來的改成navbar-left。 ![]() Step4 這時選單就向左靠齊。 ![]() Step5 但要居中時,就得自己手動來加工一下,而作法也很簡單,將下方的CSS樣式加入後,再分別將navbar-collapse-center、navbar-center,加到指定的標籤中,就可實現在導覽列中的選單居中啦! nav居中樣式: .navbar-center { display: inline-block; float: none; vertical-align: top; } .navbar-collapse-center { text-align: center; } ![]() Step6 這時選單就變居中啦! ![]() |
You are subscribed to email updates from 梅問題.教學網. To stop receiving these emails, you may unsubscribe now. |
Email delivery powered by Google |
Google Inc., 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
全站熱搜