【问题标题】:How to pull next text into input element如何将下一个文本拉入输入元素
【发布时间】:2021-12-30 15:44:17
【问题描述】:

这是我的情况:

#hours 是输入元素的 ID。

更改如下样式后,在 Firefox 中,结果是可取的,但 int Chrome 'Hours' 低于输入并且不可见。请注意,我不能将“小时”放在<span> 或其他元素中,也不能使输入元素透明!

#hours {
    margin-right: -4.5em;
}

是否可以像 Firefox 一样在 Chrome 中显示?

#Edit --------------------------------------------- ---

附注: chrome中的“后面”和“前面”有什么区别?

【问题讨论】:

    标签: css google-chrome firefox show-below-element


    【解决方案1】:

    尝试将input 元素包含在一个新的div 中,并将div 样式设置为:

    position: relative;
    

    #hours 样式:

    position: absolute;
    z-index: 10;
    margin-right: -4.5em;
    

    【讨论】:

      猜你喜欢
      • 2022-12-19
      • 1970-01-01
      • 2021-05-27
      • 2012-02-12
      • 1970-01-01
      • 2016-08-07
      • 2020-05-13
      • 2019-08-15
      • 1970-01-01
      相关资源
      最近更新 更多