我想在font-size
标记内找到正常h2
的链接,该链接将被拉到右侧
如果不进入新线,我怎么能有不同的font-size
?
我希望这一切都在同一行...无论我把它放在链接里面它都会转到新行
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<h2 class="title-bg acenter">title
<a class="heading pull-right" href="#">
pull right link title
</a>
</h2>
答案 0 :(得分:1)
您可以尝试使用small
,在引导程序中将font-size
设置为65%
(您可能需要设置small
标记的样式,颜色明智)
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<h1>With small</h1>
<h2 class="title-bg acenter">title
<a class="heading pull-right" href="#">
<small> pull right link title</small>
</a>
</h2>
<hr />
<h1>Without small</h1>
<h2 class="title-bg acenter">title
<a class="heading pull-right" href="#">
pull right link title
</a>
</h2>
答案 1 :(得分:1)
请尝试这样:
<h2 class="title-bg acenter">title
<a class="heading pull-right sm_font" href="#">
pull right link title
</a>
</h2>
CSS:
a.sm_font{font-size:12px}