2012-08-05 131 views
16

有什麼辦法可以把上引導的導航欄等的圖像(品牌標識):放在Twitter的引導導航欄徽標不調整導航欄

<div class="navbar navbar-fixed-top"> 
<div class="navbar-inner"> 
    <div class="container"> 
     <a class="brand" href="#"><img src="../Content/Images/logo.png" /></a> 
    </div> 
</div> 
</div> 

,並保持高度的導航欄不變? 我試圖

.navbar .brand 
{ 
display: block; 
height: 125px; 
width: 246px; 
padding: 0; 
background: url('../Content/Images/logo.png') no-repeat left center; 
float:left; 
position: absolute; 
} 

和我有定位良好的效果,但鏈接過來的標誌。

回答

31

鏈接過來的標識

這是由絕對定位造成的。

更新沒有調整圖像大小:

.navbar .brand { 
    max-height: 40px; 
    overflow: visible; 
    padding-top: 0; 
    padding-bottom: 0; 
} 

Demo without resizing image (jsfiddle)

+0

我不希望像被重新調整大小。我不想重新調整容器的大小。看看這個標誌[鏈接](http://www.skagos.gr/) – dseferlis 2012-08-05 21:17:15

+0

@dseferlis檢查我的編輯 – Sherbrow 2012-08-05 21:30:44

+0

你的編輯做的伎倆。謝謝。 – dseferlis 2012-08-06 12:10:37