2
Q
将图像对齐
A
回答
2
以下是工作示例:确保在发布后添加clearfix或添加overflow:对其隐藏,因为它的两个子项都已浮动。
.post {
clear:both;
overflow:hidden;
}
.post img {
float:left;
margin-right:15px;
}
.post .post-Excerpt {
float:left;
}
<div class="post">
<img style="vertical-align:middle" src="https://placehold.it/160x160">
<div class="post-excerpt">
<h2>This is title</h2>
<p>THis is lorem ipsum text that goes here as paragraph test. THis is lorem ipsum text that goes here as paragraph test. </p>
<a href="#">Read more</a>
</div>
</div>
相关问题
- 1. 将图像向右对齐
- 2. 将图像连续对齐
- 3. 将JavaScript图像与HTML图像对齐
- 4. 图像对齐
- 5. 对齐图像
- 6. 对齐图像
- 7. Bootstrap 2列垂直对齐+ 1图像对齐左对齐+ 1图像对齐
- 8. TinyMCE图像对齐
- 9. CSS图像对齐
- 10. CSS - 对齐图像
- 11. 图像框对齐
- 12. FPDF - 图像对齐
- 13. NSTextAttachment图像对齐
- 14. Div图像对齐
- 15. pandoc图像对齐
- 16. JTabbedPane图像对齐
- 17. 对齐Jcrop图像
- 18. ckeditor图像对齐
- 19. 对齐图像 - Android
- 20. 将背景图像相对于其他背景图像对齐
- 21. 将图像对齐到中心
- 22. 将文本对齐下面的图像
- 23. 如何将图像与中心对齐?
- 24. 如何将图像与名称对齐?
- 25. 如何将图像与文字对齐?
- 26. 将图像对齐在一起
- 27. 将UITabBarItem图像向左右对齐
- 28. 将同一行内的图像对齐
- 29. 将图像对齐到底部div
- 30. 如何将文本与图像对齐?
把一个div内的所有产品文字并添加'float'。 –