html - 推特 Bootstrap 导航栏中的 Glyphicon 和 Select

标签 html css twitter-bootstrap twitter-bootstrap-3

我为此苦苦挣扎了将近一个小时。

我想要 glyphicon 并在 twitter bootstrap 导航栏中选择。 但是因为我正在设计 glyphicon 的样式,所以它看起来会更大(这对我来说很重要)

{
    font-size: 30px;
    cursor: pointer;
    margin: 0 0 0 30px;
}

我选择的位置低于它应有的位置(它不在中心)。此外,如果我调整窗口大小,图标和选择都会下降,但仍有足够的空间。如果我删除一个元素(选择或图标),另一个看起来没问题。我尝试使用 line-heightmarginpadding 来解决问题,但没有成功。

任何 CSS 大师都可以告诉我应该如何让它看起来漂亮吗?请find my fiddle here .

最佳答案

尝试

.navbar-default select
{
    margin-top: -20px;
}

由于 Bootstrap 的响应特性,出现了调整大小的“问题”。 You can disable it.

关于html - 推特 Bootstrap 导航栏中的 Glyphicon 和 Select,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22756100/

相关文章:

css - 在 Shiny 中如何控制 slider 上数字的大小?

html - 如何使这些图标不出现在导航栏的顶部?

jquery - Bootstrap 模态 : sideway slide in and out

android - Android 浏览器中的文本区域被键盘隐藏

html - 交错列效应

html - CSS - 如果 div 为空,则显示内容

javascript - 绕过 CSS "Universal Selector * Reset"

javascript - 有没有更好的方法来设置和从 LocalStorage 获取?

jquery - 高度为 100% 并自动滚动 bootstrap 3

css - Bootstrap 导航栏居中链接并右对齐其他链接