Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个图像,我想将它与一些文本内联使用,但我需要它来匹配文本高度。我知道它是可能的,<img src="img.jpg" height=16>甚至是<img src="img.jpg" height="100%">,但前者不随文本大小缩放,而后者似乎使它成为 div 的大小,而不是文本高度。任何人都可以帮忙吗?
<img src="img.jpg" height=16>
<img src="img.jpg" height="100%">
示例 HTML:
<body> This is a test <img src="img.jpg"> </body>
img {height: 1em;}