Text input on Chrome: line-height seems to have a minimum

后端 未结 8 699
無奈伤痛
無奈伤痛 2021-01-03 17:40

I\'m trying to style a text input with a value, text input with a placeholder, and a span, identically in Chrome. Specifically, I would like to control the line-height indep

8条回答
  •  心在旅途
    2021-01-03 18:40

    Line height to 1.2 value (that's 120% of font size) works perfectly in chrome

    http://plnkr.co/edit/rJmXLRrGFpi46Vv5THm5?p=preview

      div, input, span {
          line-height: 1.2;
      }
    

    The only change that I make it's change the two line heights of 50 pixels to 1.2. It doesn't breaks the layout and the three elements are aligned fine.

    So your original code works fine in firefox.

提交回复
热议问题