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?

ChatGPTを使用したアプリ開発記【背景色の改修】

Posted at

✅ 全体構文

App.js
<div className="min-h-screen bg-gradient-to-br from-blue-200 via-blue-100 to-white p-8 font-sans">

🔹 min-h-screen

• 意味:最小高さを「画面の高さ(100vh)」にします。
• 目的:ページ全体を埋めるように背景が表示されるようにする。
• 効果:投稿が少なくても背景が途切れず、常に縦に全画面に背景が広がります。

🔹 bg-gradient-to-br

• 意味:背景を「右下方向(bottom right)」に向けたグラデーションにします。
• 略語:
bg:背景
gradient-to-br:グラデーションの方向(Top → Bottom Right)

🔹 from-blue-200

• 意味:グラデーションの始点の色が blue-200。
• blue-200 は淡い水色系の色で、背景を柔らかく見せる効果があります。

🔹 via-blue-100

• 意味:グラデーションの途中の色が blue-100。
• 役割:中間色を挟むことで滑らかな色の移り変わりを実現。

🔹 to-white

• 意味:グラデーションの終点の色が white(白)。
• 結果:淡い水色から白へ自然にフェードしていく背景になります。

🔹 p-8

• 意味:パディング(内側の余白)を全方向 8(= Tailwind基準で 2rem)与えます。
• 効果:画面の左右上下に適度な空間を保って、レイアウトが詰まらず見やすくなります。

🔹 font-sans

• 意味:サンセリフ体(ゴシック体)をフォントとして指定。
• 理由:Webアプリでは視認性が高いため、Sans-serif がよく使われます。

✅ UI

スクリーンショット 2025-05-16 16.39.03.png

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?