Remove 3 pixels in iOS/WebKit textarea

前端 未结 7 1446
说谎
说谎 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:36

    can't test it right now, but try

    float: left;
    

    and/or

    border-width: 0;
    

    and/or

    padding: -3px;
    

    EDIT - another try:

    -webkit-padding-start: 0px;
    -webkit-margin-start: 0px;
    text-indent: 0px;
    border-spacing: 0px;
    -webkit-border-horizontal-spacing: 0px;
    outline-offset: 0px;
    

    For a reference including compatibility information see https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariCSSRef/Introduction.html#//apple_ref/doc/uid/TP30001267-SW1

提交回复
热议问题