向右浮动将上一行向下移动

时间:2018-11-03 03:15:58

标签: html css twitter-bootstrap

我下面有这个,当我在上面放一个浮点数时,下面的下一行与具有日期的第一行相同。如何将它们放在两条不同的线上?

for i in `cat file`
while IFS = read -r line;
do
if [[ $line == AA* ]] ; then
        y=$(echo "$line" | cut -d',' -f 4)
        sed -i "s/${y}/ZZ/" $i
fi
done < $i

4 个答案:

答案 0 :(得分:0)

Bootstrap具有类似float-right的类。

the sources

答案 1 :(得分:0)

在第二个元素上设置clear:both规则:

.first{
   float:right;
}

.second{
   clear:both;
}
<div class="col-sm-10">
    <div class="row first">Nov 02 2018</div>
    <div class="row second">George</div>
    <div class="row">Hi George, how are you?</div>
</div>

答案 2 :(得分:0)

我不太确定您到底想达到什么目的,但是我希望这个正确。我在offset-sm-1的中间添加了div,并在<br>的末尾添加了date,将George设置为另一行

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">

<div class="col-sm-10 offset-sm-1">
  <div class="row" style="float: right;">Nov 02 2018</div><br>
  <div class="row">George</div>
  <div class="row">Hi George, how are you?</div>
</div>

答案 3 :(得分:0)

在浮动后将.clearfix类添加到.row

相关问题