【问题标题】:absolutely positioned element in a button problem按钮问题中的绝对定位元素
【发布时间】:2012-08-19 04:18:07
【问题描述】:

有一个奇怪的问题。因为我的生活无法追溯(我敢肯定,这将是一个菜鸟问题 - 只是看不到它!)

我有一个相对定位的跨度,其中绝对位置为 right:0 top: 0 bottom: 0 并且宽度为 20px....

在 chrome/safari ie9 中很好(尚未检查 7/8),但 Firefox 设置正确:-6px botom -3px...

非常难过 - 我已经找了一段时间了,树木挡住了树林......

这是页面 - 以及左侧面板中搜索表单上的按钮。

demo page

非常感谢任何帮助。

【问题讨论】:

    标签: css firefox


    【解决方案1】:

    我用firebug快速玩了一下,发现

    .panel 按钮 {height: 1.5em} (public-layout.css, line 102)

    和按钮 {font-size: 0.9em}(public-tipography.css,第 60 行)

    以某种方式更改布局。

    【讨论】:

    • 谢谢戴夫。线高负责顶部偏移的变化,但可惜不是正确的偏移。这对于 firefox 来说是非常奇怪的行为 - 其他浏览器的行为似乎与预期一样!
    【解决方案2】:
    button span {
    bottom:0;
    height:20px;
    position:absolute;
    right:0;
    width:20px;
    }
    

    【讨论】:

      猜你喜欢
      • 2022-12-22
      • 2011-11-26
      • 2011-11-21
      • 2010-10-28
      • 2013-01-25
      • 2022-01-26
      • 1970-01-01
      • 1970-01-01
      • 2018-02-07
      相关资源
      最近更新 更多