好吧,你可以从容器div开始.然后添加一个设置宽度的'box'div.如果你将这些div浮动到左侧,它们将在容器中对齐.然后,您可以为框内的项添加框架.
#container {
width:500px;
background-color:#CCC;
}
.box {
width:50%;
float:left;
min-height:120px;
}
.boximg {
// this is your icon for each box
width:20px;
float:left;
display:inline;
}
.boxtitle {
font-weight:bold;
float:left;
display:inline;
}
Run Code Online (Sandbox Code Playgroud)
那你的HTML:
<div id="container">
<div class="box">
<div class="boximg"><img src=""/></div>
<span class="boxtitle">Here is your box title</span>
<p>Your box text here</p>
</div>
<!-- add more boxes here -->
</div>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
88 次 |
| 最近记录: |