一切正常,除了当更改我的 p 标签字体大小时,它会使内联块无效并且元素不再并排..任何想法为什么会这样?
小提琴
HTML
<section>
<div class="first">
<p>hello this is some text</p>
<p>and here is some more text</p>
<div class="ipad"></div>
</div>
</section>
CSS:
.first p {
display: inline-block;
}
.ipad {
background: url(http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/IPad_3.png/220px-IPad_3.png) no-repeat;
display: inline-block;
border: 1px solid #333;
height:100px;
width:100px;
}
section p {
margin: 0;
padding: 1em 0;
font-size: 1.8em;
line-height: 1.5;
}