質問編集履歴
3
コード追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -25,8 +25,8 @@
|
|
25
25
|
|
26
26
|
|
27
27
|
↓↓実際に書いたもの↓↓
|
28
|
-
【html】
|
29
28
|
|
29
|
+
```html
|
30
30
|
<header class="navbar navbar-light sticky-top bg-light flex-md-nowrap p-0 border-bottom">
|
31
31
|
<nav class="w-100 nav-justified navbar navbar-expand-lg header-style">
|
32
32
|
|
@@ -69,9 +69,11 @@
|
|
69
69
|
</nav>
|
70
70
|
</header>
|
71
71
|
|
72
|
+
```
|
72
73
|
----------------------------------------------------------------------------------------
|
73
74
|
|
75
|
+
|
74
|
-
|
76
|
+
```css
|
75
77
|
.main-margin-bottom {
|
76
78
|
margin-bottom: 52px;
|
77
79
|
}
|
@@ -94,4 +96,5 @@
|
|
94
96
|
padding-bottom: 0px !important;
|
95
97
|
padding-left: 0px !important;
|
96
98
|
padding-right: 1.5px !important;
|
97
|
-
}
|
99
|
+
}
|
100
|
+
```
|
2
ソース、現象、やりたいことの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
ホームページを作成しているのですが、画面縮小時にヘッダーの横表示されているメニューを、画面幅がある一定のサイズになったら縦に上から並べて表示したいです。
|
2
2
|
|
3
|
+
【現状】
|
3
|
-
|
4
|
+
画面サイズを縮小していくと、一段ずつ切り替わってしまいます。
|
5
|
+
(最初にログイン:が基本情報の下にきて、その次に最終ログイン日時:、最終的に上から書いたとおりの順番で表示される)
|
6
|
+
【やりたいこと】
|
7
|
+
画面サイズを縮小したときに、左側にあるサイドメニューがパッと表示されなくなって、同時にヘッダーのメニューがいっきに縦積み表示になるようにしたい。
|
4
8
|
|
9
|
+
●縮小されていない時
|
10
|
+

|
11
|
+
●画面が縮小された時
|
12
|
+

|
13
|
+
|
5
14
|
【使用しているもの】
|
6
15
|
●CSS
|
7
16
|
●html
|
@@ -17,14 +26,13 @@
|
|
17
26
|
|
18
27
|
↓↓実際に書いたもの↓↓
|
19
28
|
【html】
|
20
|
-
コード
|
21
29
|
|
22
|
-
<!-- navbar -->
|
23
30
|
<header class="navbar navbar-light sticky-top bg-light flex-md-nowrap p-0 border-bottom">
|
24
31
|
<nav class="w-100 nav-justified navbar navbar-expand-lg header-style">
|
25
|
-
<!-- brand -->
|
26
|
-
<a class="navbar-brand title-size title-font-size col-sm-3 col-md-2 mr-0" [routerLink]="['./']">基本情報</a>
|
27
32
|
|
33
|
+
<a class="navbar-brand title-size title-font-size col-sm-3 col-md-2 mr-0" [routerLink]="
|
34
|
+
['./']">基本情報</a>
|
35
|
+
|
28
36
|
<ul class="navbar-nav mr-auto px-3">
|
29
37
|
<li class="nav-item text-nowrap ">
|
30
38
|
<a class="nav-link" role="button" (click)="openModal()">
|
@@ -58,13 +66,12 @@
|
|
58
66
|
</a>
|
59
67
|
</li>
|
60
68
|
</ul>
|
61
|
-
|
62
|
-
|
69
|
+
</nav>
|
63
70
|
</header>
|
64
71
|
|
72
|
+
----------------------------------------------------------------------------------------
|
65
73
|
|
66
74
|
【css】
|
67
|
-
コード
|
68
75
|
.main-margin-bottom {
|
69
76
|
margin-bottom: 52px;
|
70
77
|
}
|
1
ソースの追記
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
ヘッダーの横表示されているメニューを、画面幅がある一定のサイズになったら縦に上から並べて表示したい
|
body
CHANGED
@@ -12,4 +12,79 @@
|
|
12
12
|
参考にしているサンプルはこちら↓
|
13
13
|
https://getbootstrap.com/docs/4.0/examples/dashboard/
|
14
14
|
|
15
|
-
宜しくお願いします。
|
15
|
+
宜しくお願いします。
|
16
|
+
|
17
|
+
|
18
|
+
↓↓実際に書いたもの↓↓
|
19
|
+
【html】
|
20
|
+
コード
|
21
|
+
|
22
|
+
<!-- navbar -->
|
23
|
+
<header class="navbar navbar-light sticky-top bg-light flex-md-nowrap p-0 border-bottom">
|
24
|
+
<nav class="w-100 nav-justified navbar navbar-expand-lg header-style">
|
25
|
+
<!-- brand -->
|
26
|
+
<a class="navbar-brand title-size title-font-size col-sm-3 col-md-2 mr-0" [routerLink]="['./']">基本情報</a>
|
27
|
+
|
28
|
+
<ul class="navbar-nav mr-auto px-3">
|
29
|
+
<li class="nav-item text-nowrap ">
|
30
|
+
<a class="nav-link" role="button" (click)="openModal()">
|
31
|
+
ID:
|
32
|
+
<span class="text-primary">{{this.nameID}} </span>
|
33
|
+
<i class="fa fa-search fa-fw" aria-hidden="true"></i>
|
34
|
+
</a>
|
35
|
+
</li>
|
36
|
+
</ul>
|
37
|
+
|
38
|
+
<ul class="nav ml-auto">
|
39
|
+
<li class="nav-item px-2 text-nowrap ">
|
40
|
+
<span class="navbar-text">
|
41
|
+
ログイン:
|
42
|
+
<span class="text-primary">{{this.userName}}</span>さん
|
43
|
+
</span>
|
44
|
+
</li>
|
45
|
+
|
46
|
+
<li class="nav-item px-2 text-nowrap ">
|
47
|
+
<span class="navbar-text">
|
48
|
+
最終ログイン日時:
|
49
|
+
<span class="text-primary">{{this.lastLoginTime | date:"medium"}}</span>
|
50
|
+
</span>
|
51
|
+
</li>
|
52
|
+
</ul>
|
53
|
+
|
54
|
+
<ul class="navbar-nav px-3">
|
55
|
+
<li class="nav-item text-nowrap ">
|
56
|
+
<a class="nav-link" (click)="logout()">
|
57
|
+
<i class="fa fa-sign-out" aria-hidden="true"></i> ログアウト
|
58
|
+
</a>
|
59
|
+
</li>
|
60
|
+
</ul>
|
61
|
+
|
62
|
+
</nav>
|
63
|
+
</header>
|
64
|
+
|
65
|
+
|
66
|
+
【css】
|
67
|
+
コード
|
68
|
+
.main-margin-bottom {
|
69
|
+
margin-bottom: 52px;
|
70
|
+
}
|
71
|
+
|
72
|
+
.nav-margin-top {
|
73
|
+
margin-top: 48px;
|
74
|
+
}
|
75
|
+
|
76
|
+
.title-size{
|
77
|
+
min-width: 180px;
|
78
|
+
min-height: 21px;
|
79
|
+
}
|
80
|
+
|
81
|
+
.title-font-size{
|
82
|
+
font-size: 23px;
|
83
|
+
}
|
84
|
+
|
85
|
+
.header-style{
|
86
|
+
padding-top: 0px !important;
|
87
|
+
padding-bottom: 0px !important;
|
88
|
+
padding-left: 0px !important;
|
89
|
+
padding-right: 1.5px !important;
|
90
|
+
}
|