keep placeholder on focus in IE10

前端 未结 7 1287
Happy的楠姐
Happy的楠姐 2020-11-30 05:42

Under WebKit and Firefox, the text in a input\'s placeholder sticks around on focus—it doesn\'t disappear until input.val

7条回答
  •  离开以前
    2020-11-30 06:07

    There is no good way to make placeholder stay on field focus in IE 10+ but if you are trying to replace labels with placeholders then you should take a look at this.

    http://mozmonkey.com/2014/02/css-only-placeholders-field-labels-i-e-float-labels/

    It is way to combine placeholders and label to improve user experience.

提交回复
热议问题