Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 在引导导航栏上插入图像_Html_Css_Twitter Bootstrap - Fatal编程技术网

Html 在引导导航栏上插入图像

Html 在引导导航栏上插入图像,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我试图在导航栏上设置一个图像,但我不能正确地放置它 以下是html: <nav class="navbar navbar-inverse navbar-fixed-top "> <div class="navbar-header"> <a class="navbar-brand" href="#"> <img width="130px" height="70px"src="{% static "series/images/log

我试图在导航栏上设置一个图像,但我不能正确地放置它

以下是html:

<nav class="navbar navbar-inverse navbar-fixed-top  ">
  <div class="navbar-header">
    <a class="navbar-brand" href="#">
      <img width="130px" height="70px"src="{% static "series/images/logo.png"%}">
    </a>
    <a class="navbar-brand" href="{% url 'series:index'%}">
      <span class="glyphicon glyphicon-home"></span> | MEGA SERIES  </a>
  </div>
  <ul class="nav navbar-nav">
    <li class="active"><a href="{% url 'series:index'%}">Series</a></li>
  </ul>
</nav>

以下是图像显示的内容:

我能做什么


谢谢。

。navbar品牌应具有
显示:内联块
.navbar brand.img
应具有
最大宽度
最大高度


还可以尝试添加
垂直对齐:顶部

您可以使用CSS对齐图像

<img width="130px" height="70px"src="{% static "series/images/logo.png"%}" style="position:relative;top:-10px">

您可以这样做--

工作示例

.navbar inverse.navbar品牌{
显示器:flex;
对齐项目:居中;
填充物:5px;
}
.navbar品牌img{
身高:100%;
右边距:20px;
}