我正在尝试使用 Div 获得以下输出,
需要输出
Row1
Views Checks Title users
Topics
Row2
Views Checks Title users
Topics
Row3
Views Checks Title users
Topics
下面是我的代码,
HTML
<div class="blockdiv" >
<div class="views">
TotalViews
</div>
<div class="answers">
TotalAnswers
</div>
<div class="titles">
title<br>
Topic
</div>
<div class="user">
UserId
</div>
</div>
<div class="blockdiv">
<div class="views">
TotalViews
</div>
<div class="answers">
TotalAnswers
</div>
<div class="titles">
title<br>
Topic
</div>
<div class="user">
UserId
</div>
</div>
CSS
.views{
float:left;
width:10;
padding:5px;
}
.answers{
float:left;
width:10;
padding:5px;
}
.titles{
float:left;
width:200;
padding:5px;
}
.user{
float:left;
width:40;
padding:5px;
}
#blockdiv{
float:none;
clear:all;
}
电流输出
TotalViews TotalAnswers title UserId TotalViews TotalAnswers title UserId
Topic Topic
我将两个 div 并排放置。
如何使第二个 div 转到下一行?
谢谢