0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

textareaの右下の伸縮ボタンを消す方法

Last updated at Posted at 2023-06-07

概要

textarea 要素を作成した際に、以下のようにユーザーがテキストエリアのサイズを自由に変更できる機能が提供されております。しかし、これがウェブページのレイアウトに影響を与える場合や、特定のデザインを実装するためには、この伸縮ボタンを非表示にしたい場合もあります。それを実現するための方法をご紹介致します。

解決法

以下のようにtextarea 要素にresizeのプロパティを入れることで解決致します。

textarea {
  resize: none;
}

上記のコードは、すべての textarea 要素に対して伸縮ボタンを非表示に設定します。resize: none; は、ユーザーが要素のサイズを変更することを禁止します。
スクリーンショット 2023-06-07 11.57.02.png

参考

textareaの右下の伸縮ボタンを1行で消す

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?