网格 / 等宽的框
通过使用 float 属性,可以轻松地并排浮动内容框:
实例
<!DOCTYPE html>
<html>
<head>
<style>
* {
box-sizing: border-box;
}
.box {
float: left;
width: 33.33%;
padding: 50px;
}
.clearfix::after {
content: "";
clear: both;
display: table;
}
</style>
</head>
<body>
<h1>网格框</h1>
<p>并排浮动的框:</p>
<div class="clearfix">
<div class="box" style="background-color:#bbb">
<p>框中的一些文本。</p>
</div>
<div class="box" style="background-color:#ccc"&