Remove 3 pixels in iOS/WebKit textarea

前端 未结 7 1420
说谎
说谎 2021-02-06 23:39

I\'m trying to create a textarea that looks exactly like a div.

However, on iOS there\'s 3 pixels coming from somewhere that I can\'t remove.

7条回答
  •  囚心锁ツ
    2021-02-07 00:24

    One work around is to use a div that you set as editable.

    HTML

    Editable text...

    Javascript:

    This is a test

    jQuery

     $(this).prop('contentEditable',true);
    

提交回复
热议问题