将图像与文本 CSS 对齐
我不明白为什么这个文本不会与图像的中间对齐。检查下面的屏幕截图,一张突出显示,一张未突出显示:
我希望“澳大利亚”一词排列在图像中间(与箭头对齐)。正如您从高光中看到的那样,问题不是图像的高度。
我尝试过vertical-align:middle,这有帮助,但正如你所看到的,它并不完美!
建议表示赞赏!
I can't understand why this text won't line up with the middle of an image. Check the screenshots below, one highlighted, one not:
I want the word Australia to line up in the middle of the image (aligned with the arrow). As you see from the highlight it isn't the height of the image that is the problem.
I have tried vertical-align:middle which helps but as you can see it is not perfect!
Suggestions appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果这是一个链接,请使用 CSS 背景。我猜测下面的值,但您可以根据您的情况轻松调整它们。
If this is a link, use a CSS background. I'm guessing at the values below, but you can easily tweak them for your situation.