LoginSignup
1
2

More than 3 years have passed since last update.

Bootstrapデザインコントロール/初心者用(メモ)

Posted at

Bootstrapの初心者用メモ

Formの基本

Bootstrap Form おさらい -Qiita

・レイアウトにより(inline, horizontal)、マークアップが異なる。
・text系(input, textarea, select)と、その他のものは扱いが違う。
・horizontal では form-group が row と同じ概念になる。(なので要素をcol-xで分割)

・text系はlabelと一緒に class="form-group" で囲む。
・text系は class="form-control" を定義する。
・checkbox, radiobutton, submit等は form-group では囲まない。(horizontalでは囲む)

グリッドシステム

レイアウトを格子状に分解して配置するデザイン手法(Bootstrapでは横幅を12分割)
Bootstrapのグリッドシステムについてまとめてみた -Qiita

・class = "container"(固定枠)または "container-fluid"(流動枠)の中に書く
・class = "row" の中に書く
・class = "col-{prefix}-{columns}" の形で書く
・class = {columns}は合計が12になるようにする

余白の指定(マージンとパディング)

マージン:外側(ボックス)の余白、パディング:内側(要素)の余白
Bootstrapの基本「マージン」と「パディング」
Bootstrapの余白を解説。マージンとパディングの違いとは?

class = "p{sides}-{size}" でパディング
class = "m{sides}-{size}" でマージン

ボーダーライン

ボックス内の枠線を指定する際に使用するプロパティ
Bootstrap4 Border(ボーダー)の使い方を徹底解説

ボタンコントロール

Bootstrap 4によるボタンの作り方。色やサイズなどの指定方法!
Bootstrap 4 のボタンのサイズ、色をカスタマイズする方法

1
2
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
1
2