【问题标题】:Text positioning behaves differently on MAC and Windows文本定位在 MAC 和 Windows 上的行为不同
【发布时间】:2013-10-02 09:33:42
【问题描述】:

我在 MAC 和 Windows 中的文本定位方面遇到了一些奇怪的问题。两者都使用 Chrome。我这里有打印。

我似乎无法将文本放置在中间,这发生在页面中的几个元素上。这是html代码。

<div align="center" class="tooltip px14 UnBC-font">
             ABOUT
             <div class="arrow"></div>
</div> <!-- tooltip -->

和css

 .navigation .tooltip{
    width:70px;
    height:20px;
    position:absolute;
    margin-left:-80px;
    text-align:center;
    padding-top:2px;
    background-color:#ffffff;
    color:#2d312c;
    display:none;
 }

.navigation .tooltip .arrow
{
    position:absolute;
    width:4px;
    height:7px;
    background-image:url(../images/main/white-little-arrow.png);
    right:0px;
    top:50%;
    margin-top:-3px;
    margin-right:-4px;
}

【问题讨论】:

    标签: html css windows macos


    【解决方案1】:

    尝试设置line-height 看看是否有帮助:)

    【讨论】:

    • 看起来它成功了,我确定我之前尝试过。但现在可以了,谢谢!
    猜你喜欢
    • 1970-01-01
    • 2014-02-07
    • 2017-08-15
    • 1970-01-01
    • 2013-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-09
    相关资源
    最近更新 更多