Textarea scrollbar overlapping round border in IE

和自甴很熟 提交于 2020-03-05 11:43:10

问题


For some reason, when round border is added to the textarea, in IE the scrollbar slightly overlaps the border corners. See https://jsfiddle.net/bgas48b4/ (in IE)

<style>
textarea{
 border: 1px solid black;
 border-radius: 4px;
 height: 100px;
}
</style>

<textarea></textarea>

My temporary solution was to use overflow-y:auto to hide the scrollbar by default.

However, I was wondering if there is a better solution.

Thanks


回答1:


try this i hope it is better for look and feel in IE

 textarea{
        border: 1px solid black;
        border-radius: 4px;
        height: 100px;
        overflow:hidden;
        max-height:150px;
        overflow-y:auto;
    }
<textarea></textarea>


来源:https://stackoverflow.com/questions/30191515/textarea-scrollbar-overlapping-round-border-in-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!