我编写了这个简单的 code :
HTML
<div class="row offset3">
<div class="title">Title1</div>
<div class="title-arrow">
<a href="#"><i class="icon-arrow-left"></i>GoBack</a>
</div>
</div>
CSS
.title{
margin-top: 20px;
}
.title-arrow{
margin-top: -22px;
margin-left: 50px;
margin-bottom: 14px;
}
我的问题是,如果我将 Title1 更改为更大的标题,例如 titllleeeeeeeeeeeeeeee 箭头不会向右移动.. 好的我明白了它的正常行为!我必须在类(class)标题中加上属性(property) margin 。我试图放置一个 margin-right:10px;
但没有任何反应..
最佳答案
只需这样做:
HTML:
<div class="row offset3">
<div class="title">Titleaa</div>
<span class="title-arrow">
<a href="#"><i class="icon-arrow-left"></i>GoBack</a>
</span>
</div>
CSS
.title{
margin-top: 20px;
display: inline;
}
类 title-arrow
不再需要了,但它在那里以备不时之需。
关于html - bootstrap 中连续的 margin 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19046876/