2015-10-07 194 views
-2

我有一个标志,其尺寸为2829×1913,它是一个PNG。我如何将它纳入导航栏引导程序?如何将徽标添加到Twitter引导程序导航栏?

下面的代码

<div class="navbar-header"> 
     <a class="navbar-brand" href="/"> 
     <img src="startupclone202.png"> 
     </a> 
    </div> 

enter image description here

如何更改项目名称,以我自己的标志,是2829×1913年到很好地适应标志?

+0

后您使用创建的输出和标识URL当前的代码。使用图像编辑器修剪徽标并使用它。 –

+0

请把一些代码,以便任何人可以帮助 –

+6

为带宽的缘故..你不觉得图像太大吗? –

回答

1

要在导航栏使用插入图片验证码:

<nav class="navbar navbar-default"> 
    <div class="container-fluid"> 
    <div class="navbar-header"> 
     <a class="navbar-brand" href="#"> 
     <img alt="Brand" src="..."> 
     </a> 
    </div> 
    </div> 
</nav> 

对于图像下载GIMP并调整其大小,太大了。

+0

我应该调整到什么大小?自举导航栏? –

+0

根据放置的图像调整导航栏的大小。根据我的经验,最好将徽标放置在导航栏外。如果您不想调整导航栏的大小,则图片必须具有20像素的高度。 –

+0

所以你提供的代码可以解决我的问题? – sinusGob

0

首先,您必须调整图像大小然后您可以尝试下面的代码为导航栏。

<div class="navbar navbar-fixed-top"> 
     <div class="navbar-inner"> 
     <div class="container"> 
      <a class="navbar-brand" href="index.html"> <imgsrc="images/xyz.jpg"></a> 

对于您必须添加下面的CSS

.navbar-brand > img { 
     max-height: 100%; 
     height: 100%; 
     -o-object-fit: contain; 
     object-fit: contain; 
    } 
     </div> 
     </div> 
    </div> 
+0

twitter导航栏的适当图片大小是多少? –

+0

我没有调整图像大小,我试图使用你的CSS代码,它不起作用,它将图像更改为46 * 60像素 –

+0

您不想更改图像像素? –

相关问题