Twitter-Bootstrap - 把简单的元素内联
有没有反正放2 < a>
显示内联的元素?
Is there anyway to put 2 <a>
elements displaying inline?
i tryed :
<div class="form-inline">
<a>jjj</a>
<a>sss</a>
</div>
以及
<div class="row-fluid">
<a class="inline">jjj</a>
<a class="inline">sss</a>
</div>
但不起作用。
默认情况下,锚标签应显示 inline
。您必须有一些额外的样式设置它们以显示阻止
元素或类似的元素。
Anchor tags by default should be displayed inline
. You must have some extra styling setting them to display as block
elements or something similar.
使用您的代码是一个正在运行的 JSFiddle 。
Using your code, here is a working JSFiddle.
检查您的页面,找出锚点 display
正在设置,并修改或将元素设置为 display:inline
那。您已添加 class =inline
,您只需添加:
Inspect your page to find out where the anchor's display
is being set and either modify that or set the element to display:inline
after that. As you've already added class="inline"
you can simply just add:
a { display:block; /* Pre-existing code */ }
a.inline {
display:inline;
}
还要注意,我不认为 row -fluid
旨在无需Bootstrap的其他脚手架元素即可工作,如果您需要一个完整的-width row你应该使用:
Also as a note I don't think row-fluid
is designed to work without Bootstrap's other scaffolding elements, if you want a full-width row you should use:
<div class="row-fluid">
<div class="span12">
<a class="inline">jjj</a>
<a class="inline">sss</a>
</div>
</div>