html - Html:如何将两个图像放在另一个上面与文本在同一行中?
问题描述
有没有办法将两个图像放在另一个上面与文本在同一行中?此示例为三行,第二行在“文本”字样之后有两个图像,一个在另一个之上,然后正常继续文本?是否使用 css 或表格或任何东西?
我尝试将它们放在 div 或图像块中,但不知道如何实现它。它们可以在表格单元格中一个一个放在另一个之上,但是表格不会与文本并排,它们可以在段落的右侧或左侧浮动,而不是在我认为的中间。
解决方案
使用line-height
和display:inline-block
p{
line-height:40px;
}
span{
display:inline-block;
vertical-align:middle;
}
img{
width:20px;
display:block;
}
<p>Is there a way to put two images one above the other in the same line with text? This example for three lines, and the second line has two images one above the other after <span><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ_-6FYKDSRJ2Qz8CTZLADbDgHmPaGKQjBMhbCqgEbgR7YkR7mS"><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTZYEcLppt4iu9tRNmH0KpP-_AZL62ZSgk8P36_4jG--MMXRg1xag"></span> the words "of text" and then continue the text normally? whether using css or a table or anything?</p>
推荐阅读
- plugins - 如何将 Jmeter 脚本与 UFT 或 QTP 集成
- python - selenium.common.exceptions.WebDriverException:消息:通过 Python unittest 模块执行测试用例时没有这样的会话
- node.js - 通过nodejs express 4中的单个输入上传多个文件的最佳方法是什么?
- android - 如何获取与我的应用程序相关的所有重要信息(如崩溃和错误日志),这些信息存在于 Google Playstore 上
- ios - 在哪里编写强制 iPhone 用户在其 iPhone 中更新 iOS 应用程序的代码?
- python - 文森蒂距离系列
- javascript - javascript:恢复div的背景颜色
- c - 将文件映射到内存后读取文件
- odoo-10 - ODOO 中的验证错误
- iphone - 解锁 iPhone 设备以继续?