HTML Input cursor position issue in Chrome when value is empty

前端 未结 8 1141
被撕碎了的回忆
被撕碎了的回忆 2020-12-13 13:28

Just recently I have noticed out text inputs having a display issue in Google Chrome but only when the text is empty.

Notice how in the top image, when the input is

8条回答
  •  半阙折子戏
    2020-12-13 14:01

    There is another hack that no one have mentioned as I can see. You could use a @media query to check out Chrome:

    @media screen and (-webkit-min-device-pixel-ratio: 0) {
        line-height: normal;
    }
    

提交回复
热议问题