Bootstrap: 如何让字形图标只出现在导航栏折叠中?

Bootstrap: How to make glyphicons appear only in navbar collapse?

就像我在问题标题中提到的那样,我希望导航栏中列表项的字形仅出现在移动设备中,即当导航栏折叠时。我不希望它们在具有这些列表项的 md、lg.. 设备中可见。有什么办法可以实现吗?

Bootstrap 3.x 有 helper classes 完成此任务。因此,将您的 Glyphicon 元素包裹在具有相关 类 的范围内,它们将仅在超小媒体范围内可见:

<span class="hidden-sm hidden-md hidden-lg">
    <i class="glyphicon glyphicon-user"></i>
</span>