0

テキスト領域を水平にスクロールするには? 私はそれを探しましたが、良い解決策を見つけることができませんでした。

以下のcssを試してみましたが、うまくいきません。

overflow-x: scroll;

<textarea></textarea>
4

4 に答える 4

6

以下の行を CSS に追加します。

white-space: nowrap; /* will prevent the default wrapping of text to next line */
overflow-x: auto; /* will make horizontal scroll-bar appear only when needed */

デモフィドル

于 2013-10-10T09:57:42.987 に答える
0

Try this:

textarea {
   overflow-x: vertical;
}
于 2013-10-10T09:58:22.047 に答える
0

You're doing it a bit wrong.

overflow-x: scroll;

Will create a scroll bar inside the textarea to scroll when text height is above the limit.

For this, the CSS clause is:

resize: vertical;

This will let the user resize the element vertically.

于 2013-10-10T09:58:28.560 に答える