jquery - 使用垂直对齐 CSS 使导航链接看起来更好

标签 jquery html css twitter-bootstrap

我的问题分为两部分。

  1. 最重要的部分 - 我想垂直对齐该标题旁边的箭头。在左图(现在的样子)上,您可以看到它是底部对齐的,看起来不太好。

  2. (可选)这是一个更宽泛的问题,我想我会抛出这个问题,因为无论如何我都需要第一部分的帮助...我可以做些什么来使箭头和标题看起来更好吗?也许是不同的字体,或者其他一些能让它看起来更好看的文字技巧?它现在的样子对我来说有些乏味,但我不确定如何改进它。

这是我的代码(基本主题是 bootstrap):

<h3>
    <small><i class="glyphicon glyphicon-chevron-left"></i></small> HEADING
</h3>

<div class="alert alert-info" role="alert">
    <span>This is an example of a text information box that will appear towards the top of the page.</span>
</div>

这是视觉指南:

Example

干杯

最佳答案

<h3>
<small><i class="glyphicon glyphicon-chevron-left"></i></small> <span>HEADING</span>
</h3>

添加CSS

h3 span {
vertical-align:middle;
}

关于jquery - 使用垂直对齐 CSS 使导航链接看起来更好,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29508926/

相关文章:

javascript - 使用 JavaScript 在表中显示 CSS 属性问题

json - jQuery Ajax JSONP Post 调用 WCF 服务 moSTLY 收到 400 错误请求

javascript - 滚动到 jQuery 中的内容

php - 如何从搜索结果中每页显示 n 行数

像 xaml 一样的 html 元素绑定(bind)

css - 阻止为 :focus from getting applied to :active- CSS 定义的属性

html - 如何使图像的反面可点击

javascript - jQuery Post blob 对象给出 Uncaught TypeError : Illegal invocation

javascript - scroll.scroll 禁用器有什么作用?

javascript - 一个非常非常非常大的div