我想做内联 html 样式,我希望图像向左浮动,右侧的段落并排在同一行上,但是使用下面的代码我没有得到想要的结果:
我的代码在下面,或者请查看jsFiddle
索引.html
<div class="newWrapper">
<div class="person1" style="float:left; display:inline-block; ">
<img src=simonwilliams.jpg width="auto" height"auto" clear:both;/>
<p style="float:right; display:block;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer arcu mauris, ullamcorper et ligula vitae, hendrerit sodales tellus. Maecenas quis pulvinar lacus.</p>
</div>
<div class="person2" style="float:left" display:inline-block;>
<img src=simonwilliams.jpg width="auto" height"auto"/>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer arcu mauris, ullamcorper et ligula vitae, hendrerit sodales tellus. Maecenas quis pulvinar lacus.</p>
</div>
</div>