Edit in JSFiddle


              
            
          
            
              
                
<div class="box2 elem">
    <span class="label begin"> &lt;div class="box2"&gt; </span>
    <p>我是一个行内块!</p>
         <span class="label end"> &lt;/div&gt; </span>
</div>
<div class="box2 elem">
    <span class="label begin"> &lt;div class="box2"&gt; </span>
    <p>我是一个行内块!</p>
         <span class="label end"> &lt;/div&gt; </span>
</div>
<div class="box2 elem">
    <span class="label begin"> &lt;div class="box2"&gt; </span>
    <p>我是一个行内块!</p>
         <span class="label end"> &lt;/div&gt; </span>
</div>
<div class="box2 elem">
    <span class="label begin"> &lt;div class="box2"&gt; </span>
    <p>我是一个行内块!</p>
         <span class="label end"> &lt;/div&gt; </span>
</div>
<div class="box2 elem">
    <span class="label begin"> &lt;div class="box2"&gt; </span>
    <p>我是一个行内块!</p>
         <span class="label end"> &lt;/div&gt; </span>
</div>
<div class="box2 elem">
    <span class="label begin"> &lt;div class="box2"&gt; </span>
    <p>我是一个行内块!</p>
         <span class="label end"> &lt;/div&gt; </span>
</div>
<div class="box2 elem">
    <span class="label begin"> &lt;div class="box2"&gt; </span>
    <p>我是一个行内块!</p>
         <span class="label end"> &lt;/div&gt; </span>
</div>
<div class="box2 elem">
    <span class="label begin"> &lt;div class="box2"&gt; </span>
    <p>我是一个行内块!</p>
         <span class="label end"> &lt;/div&gt; </span>
</div>
<div class="box2 elem">
    <span class="label begin"> &lt;div class="box2"&gt; </span>
    <p>我是一个行内块!</p>
         <span class="label end"> &lt;/div&gt; </span>
</div>
<div class="box2 elem">
    <span class="label begin"> &lt;div class="box2"&gt; </span>
    <p>我是一个行内块!</p>
         <span class="label end"> &lt;/div&gt; </span>
</div>
<div class="box2 elem">
    <span class="label begin"> &lt;div class="box2"&gt; </span>
    <p>我是一个行内块!</p>
         <span class="label end"> &lt;/div&gt; </span>
</div>



<div class="elem elem-orange">
    <span class="label begin"> &lt;div&gt; </span>
    <p>这次我可没有用 clear 。太棒了!</p>
    <span class="label end"> &lt;/div&gt; </span>
</div>
* {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}
.elem{
    border:solid #6AC5AC 3px;
    position:relative;
}

.elem-orange {
    border: solid #FDC72F 3px;
}

.label{
    position:absolute;
    background-color:#6AC5AC;
    line-height:1em;
    padding:3px;
}
.elem-orange > .label{
    background-color:#FDC72F;
}
.begin{
    left:0;
    top:0;
}
.end{
    right:0;
    bottom:0;
}
p{
    margin:2em 0;
    display:block;
}
.box2 {
  display: inline-block;
  width: 200px;
  height: 100px;
  margin: 1em;
}