【问题标题】:How to valign small pictures within text, so it looks the same for all web-browsers如何在文本中对齐小图片,以便所有网络浏览器看起来都一样
【发布时间】:2011-12-02 12:31:48
【问题描述】:
<div style="">How to valign <img src="pictures/qsign.gif" alt="question sign"/>
within text <img src="pictures/qsign.gif" alt="question sign"/>? It looks a bit
different when use different web-browsers.</div>

我应该在 style="" 中放置什么来垂直对齐它?那些图片很小,所以它们看起来像文本中的符号。 在 Opera 中,它在文本中看起来比在 Chrome 中要低一些,但我希望它完全符合任何浏览器中的文本行。

【问题讨论】:

  • 是的。请看上面...谢谢。

标签: css text vertical-alignment image


【解决方案1】:

只需在您自己的课程中尝试这个或类似的方法;

<style>
.test img { vertical-align:middle;}
</style>
<div class="test">How to valign <img src="pictures/qsign.gif" alt="question sign"/>
within text <img src="pictures/qsign.gif" alt="question sign"/>? It looks a bit
different when use different web-browsers.</div>

【讨论】:

    【解决方案2】:

    'vertial-align' 是您要查找的 CSS 属性。

    【讨论】:

      猜你喜欢
      • 2013-05-04
      • 2021-12-04
      • 2017-09-28
      • 2017-05-24
      • 2011-06-08
      • 1970-01-01
      • 2011-05-19
      • 1970-01-01
      • 2015-09-27
      相关资源
      最近更新 更多