twitter bootstrap btn-navbar仅显示一行 [英] twitter bootstrap btn-navbar only shows one line

查看:30
本文介绍了twitter bootstrap btn-navbar仅显示一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下导航栏折叠:

<button type="button" class='btn btn-navbar' data-toggle='collapse' data-target='.nav-collapse'>
        <span class="icon-bar"/>
        <span class="icon-bar"/>
        <span class="icon-bar"/>
</button>

但是,我在实际的栏上只得到一行.有什么办法可以解决这个问题?

However I only get a single line on the actual bar. Is there a way I can fix this?

推荐答案

尝试:

<button type="button" class='btn btn-navbar' data-toggle='collapse' data-target='.nav-collapse'>
  <span class="icon-bar"></span>
  <span class="icon-bar"></span>
  <span class="icon-bar"></span>
</button>

span 标签不是单个标签.如果您没有正确关闭它,浏览器会将其解释为:

The span tag is not a single tag. If you don't close it properly, the browser interprets it as:

<span class="icon-bar">
  <span class="icon-bar">
    <span class="icon-bar"></span>
  </span>
</span>

这就是为什么您只得到一个小节的原因.

Which is why you were only getting one bar.

这篇关于twitter bootstrap btn-navbar仅显示一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆