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. 将JavaScript图像与HTML图像对齐
- 3. 对齐图像
- 4. Div图像对齐
- 5. TinyMCE图像对齐
- 6. CSS - 对齐图像
- 7. ckeditor图像对齐
- 8. pandoc图像对齐
- 9. NSTextAttachment图像对齐
- 10. 将背景图像相对于其他背景图像对齐
- 11. 如何将图像与中心对齐?
- 12. 将文字垂直对齐图像
- 13. 如何将文本与图像对齐?
- 14. 如何将图像对齐到右侧?
- 15. 将UITabBarItem图像向左右对齐
- 16. 将图像对齐到中心
- 17. 在DIV中将图像对齐成行
- 18. 将文本和图像相邻对齐
- 19. 如何将字幕与图像对齐?
- 20. top将文本与图像对齐
- 21. 将图像对齐UINavigationBar中的左侧
- 22. 将图像对齐在一起
- 23. 无法将图像与div对齐
- 24. 将图像与文字对齐
- 25. 将表格与图像对齐HTML
- 26. 将图像标题区域与图像对齐
- 27. 对齐图像与css
- 28. 在MigraDoc中对齐图像
- 29. 对齐UITableView中的图像
- 30. 图像对齐问题
把一个div内的所有产品文字并添加'float'。 –