# Bootstrap(Memo)

**URL:** https://forum.ficusonline.com/t/topic/427
**Category:** WEB Design
**Created:** [2021 年 8 月 7 日午前 5:02 UTC](https://forum.ficusonline.com/t/topic/427 "2021-08-07T05:02:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)
#### Post date: [2021 年 8 月 7 日午前 5:02 UTC](https://forum.ficusonline.com/t/topic/427/1 "2021-08-07T05:02:41Z")

</div>

## Bootstrap 4 Icons

> **[W3Schools.com](https://www.w3schools.com/bootstrap4/bootstrap_icons.asp)**
>
> W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

```auto
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" crossorigin="anonymous">

```

Then, add the name of the icon class to any inline HTML element (like `<i>` or `<span>`):

> **[Font Awesome](https://fontawesome.com/v5/icons/bars)**
>
> The internet's icon library + toolkit. Used by millions of designers, devs, & content creators. Open-source. Always free. Always awesome.

### Example

```auto
<i class="fas fa-cloud"></i>
<i class="fas fa-coffee"></i>
<i class="fas fa-car"></i>
<i class="fas fa-file"></i>
<i class="fas fa-bars"></i>

```

---

<div class="post-metadata">

### Author: ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)
#### Post date: [2021 年 8 月 7 日午前 5:31 UTC](https://forum.ficusonline.com/t/topic/427/2 "2021-08-07T05:31:12Z")

</div>

## Text

> **[Font weight and italics - Text](https://getbootstrap.com/docs/4.5/utilities/text/#font-weight-and-italics)**
>
> Documentation and examples for common text utilities to control alignment, wrapping, weight, and more.

```auto
<p class="font-weight-bold">Bold text.</p>
<p class="font-weight-bolder">Bolder weight text (relative to the parent element).</p>
<p class="font-weight-normal">Normal weight text.</p>
<p class="font-weight-light">Light weight text.</p>
<p class="font-weight-lighter">Lighter weight text (relative to the parent element).</p>
<p class="font-italic">Italic text.</p>

```

## Colors

> **[Colors](https://getbootstrap.com/docs/4.5/utilities/colors/)**
>
> Convey meaning through color with a handful of color utility classes. Includes support for styling links with hover states, too.

## Flex

> **[Flex](https://getbootstrap.com/docs/4.5/utilities/flex/)**
>
> Quickly manage the layout, alignment, and sizing of grid columns, navigation, components, and more with a full suite of responsive flexbox utilities. For more complex implementations, custom CSS may be necessary.

## Containers

> **[Containers](https://getbootstrap.com/docs/5.0/layout/containers/)**
>
> Containers are a fundamental building block of Bootstrap that contain, pad, and align your content within a given device or viewport.

 ![bootstrap-containers](https://forum.ficusonline.com/uploads/default/original/1X/03f23965545de357595e91faf993595e39a97e1e.png)

## Grid System

> **[Grid options - Grid system](https://getbootstrap.com/docs/5.1/layout/grid/#grid-options)**
>
> Bootstrap’s grid system uses a series of containers, rows, and columns to layout and align content. It’s built with flexbox and is fully responsive. Below is an example and an in-depth explanation for how the grid system comes together. | Use our...

 ![bootstrap-grid-system](https://forum.ficusonline.com/uploads/default/original/1X/0523cdee2818f58c62f69cb81a1fab9f5f601f24.png)

## Spacing

> **[Spacing](https://getbootstrap.com/docs/5.1/utilities/spacing/)**
>
> Bootstrap includes a wide range of shorthand responsive margin, padding, and gap utility classes to modify an element’s appearance.

Where _property_ is one of:

- `m` - for classes that set `margin`
- `p` - for classes that set `padding`

Where _sides_ is one of:

- `t` - for classes that set `margin-top` or `padding-top`
- `b` - for classes that set `margin-bottom` or `padding-bottom`
- `s` - (start) for classes that set `margin-left` or `padding-left` in LTR, `margin-right` or `padding-right` in RTL
- `e` - (end) for classes that set `margin-right` or `padding-right` in LTR, `margin-left` or `padding-left` in RTL
- `x` - for classes that set both `*-left` and `*-right`
- `y` - for classes that set both `*-top` and `*-bottom`
- blank - for classes that set a `margin` or `padding` on all 4 sides of the element

Where _size_ is one of:

- `0` - for classes that eliminate the `margin` or `padding` by setting it to `0`
- `1` - (by default) for classes that set the `margin` or `padding` to `$spacer * .25`
- `2` - (by default) for classes that set the `margin` or `padding` to `$spacer * .5`
- `3` - (by default) for classes that set the `margin` or `padding` to `$spacer`
- `4` - (by default) for classes that set the `margin` or `padding` to `$spacer * 1.5`
- `5` - (by default) for classes that set the `margin` or `padding` to `$spacer * 3`
- `auto` - for classes that set the `margin` to auto

## List Group

> **[List group](https://getbootstrap.com/docs/5.0/components/list-group/)**
>
> List groups are a flexible and powerful component for displaying a series of content. Modify and extend them to support just about any content within.

 ![bootstrap-list-group](https://forum.ficusonline.com/uploads/default/original/1X/485d83a60e718adfcb8680cda0c32b7a18dbc543.png)

```auto
<div class="list-group">
  <a href="#" class="list-group-item list-group-item-action active" aria-current="true">
    The current link item
  </a>
  <a href="#" class="list-group-item list-group-item-action">A second link item</a>
  <a href="#" class="list-group-item list-group-item-action">A third link item</a>
  <a href="#" class="list-group-item list-group-item-action">A fourth link item</a>
  <a href="#" class="list-group-item list-group-item-action disabled" tabindex="-1" aria-disabled="true">A disabled link item</a>
</div>

```

## Images

> **[Responsive images - Images](https://getbootstrap.com/docs/5.0/content/images/#responsive-images)**
>
> Images in Bootstrap are made responsive with .img-fluid. This applies max-width: 100%; and height: auto; to the image so that it scales with the parent element. | Documentation and examples for opting images into responsive behavior (so they never...

**`img-fluid`** による幅100%自動イメージサイズ  
所属エレメントの可変幅に応じてイメージ幅サイズも可変（表示領域幅100%、高さ自動）  
**`mx-auto d-block`** でセンター配置

```auto
<img src="..." class="img-fluid mx-auto d-block" alt="...">

```

## Display Property

> **[Display property](https://getbootstrap.com/docs/5.0/utilities/display/)**
>
> Quickly and responsively toggle the display value of components and more with our display utilities. Includes support for some of the more common values, as well as some extras for controlling display when printing.

各要素間の表示配列指定

 ![bootstrap-display-property](https://forum.ficusonline.com/uploads/default/original/1X/7b36c38e0c20a3e86258c7dc3753b805d4c850e5.png)

---

<div class="post-metadata">

### Author: ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)
#### Post date: [2021 年 8 月 24 日午後 1:45 UTC](https://forum.ficusonline.com/t/topic/427/3 "2021-08-24T13:45:43Z")

</div>

## hover, focus, active

**`:hover`** による要素内カーソル移動時の背景色設定

- **hover** : マウス移動時に背景色変化
- **focus** : マウス押下時に背景色変化（マウスをリリースしてもその背景色を維持）
- **active** : マウス押下時にのみ背景色変化（マウスリリースすると元の背景色へ戻る）

**リストグループ要素**

```auto
footer .footer-top .list-group-item {
    background-color: #184f8a;
    border-color: var(--gray);
    color: white;
}

footer .footer-top .list-group-item:hover {
    background-color: #0a2644;
    color: white;
}

```

**ボタン**

```auto
.btn-primary {
    color: #FFFFFF;
    /*font-size: 18px;*/
    text-align: center;
    border-radius: 6px;
    background: var(--blue);
    border-color: var(--blue);
}

.btn-outline-primary {
    border-color: var(--blue);
    color: var(--blue);
}

.btn-outline-primary:hover {
    background-color: var(--purple);
    border-color: var(--purple);
}

.btn-secondary {
    color: var(--blue);
    /*font-size: 18px;*/
    text-align: center;
    border-radius: 6px;
    background-color: #FFFFFF;
    border-color: var(--blue);
}

.btn-secondary:hover {
    background-color: var(--dark-purple);
}

.btn-primary:hover {
    background: var(--light-purple);
    border-color: var(--light-purple);
}

```
