Most elegant way to force a TEXTAREA element to line-wrap, *regardless* of whitespace

前端 未结 7 1030
深忆病人
深忆病人 2020-12-14 17:18

Html Textarea elements only wrap when they reach a space or tab character. This is fine, until the user types a looooooooooooooooooooooong enough word. I\'m looking for a wa

7条回答
  •  粉色の甜心
    2020-12-14 18:02

    • quirksmode.org has an overview of various methods.
    • There's a related SO question: "In HTML, how to word-break on a dash?"
    • In browsers that support it, word-wrap: break-word might give the desired effect as well.

提交回复
热议问题