嗨由於某種原因,我似乎無法allign我的境界我有我的導航欄用我的文字都對齊邊框:您可以在小提琴Here文本
每次我嘗試和margin-top
邊境看到它將一切都移動下來導航欄文本它的自我是在我的網頁在正確的地方,我只是想實際邊界線向下移動到與文本的位置對準
body {
font-family: 'Open Sans', sans-serif, Arial;
font-size: 16px;
color: #6D6D6D;
background-color: black;
font-weight: 300;
}
.navbar-default {
background-color: transparent;
border-top: 0px solid rgba(0, 0, 0, 0.5);
border-bottom: 0px solid rgba(0, 0, 0, 0.5);
border-left: 0px solid rgba(0, 0, 0, 0.5);
border-right: 0px solid rgba(0, 0, 0, 0.5);
-webkit-transition: background-color 200ms linear;
-moz-transition: background-color 200ms linear;
-o-transition: background-color 200ms linear;
-ms-transition: background-color 200ms linear;
transition: background-color 200ms linear;
padding-top: 9px;
padding-bottom: 20px;
}
.navbar.navbar-default .navbar-collapse {
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.navbar-nav>li {
border-right: 1px solid white;
height: 20px;
padding-left: 28px;
padding-top: 25px;
}
.navbar-nav>li:last-child {
border: none;
}
.navbar-default .navbar-toggle {
border-color: rgba(0, 0, 0, 0);
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #fff;
}
.navbar-toggle {
margin-top: 19px;
margin-right: 43px;
}
.navbar-default .navbar-nav>li>a {
color: white;
font-size: 15px;
line-height: 1px;
}
.navbar-default .navbar-nav>li>a:hover,
.navbar-default .navbar-nav>li>a:focus {
background-color: #FFC600;
text-decoration: none;
color: #ffffff;
-webkit-transition: background-color 200ms linear;
-moz-transition: background-color 200ms linear;
-o-transition: background-color 200ms linear;
-ms-transition: background-color 200ms linear;
transition: background-color 200ms linear;
}
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" data-target="#myNavbar" data-toggle="collapse" type="button">
\t \t \t \t \t <span class="icon-bar"></span> <span class="icon-bar"></span>
\t \t \t \t \t <span class="icon-bar"></span>
\t \t \t \t \t </button>
<a class="navbar-brand"><img alt="" src="Images/logo.png" class="img-responsive"></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#">Home</a>
</li>
<li>
<a href="#">About Us</a>
</li>
<li>
<a href="#">Services</a>
</li>
<li>
<a href="#">Contact Us</a>
</li>
</ul>
</div>
</div>
</nav>
其實不用擔心,完美的作品,感謝XX – RonTheOld
@RonTheOld不客氣! –