teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

add pics

2021/10/28 15:03

投稿

utasan_1008
utasan_1008

スコア56

title CHANGED
File without changes
body CHANGED
@@ -84,7 +84,7 @@
84
84
  ```
85
85
 
86
86
  ### 変更後
87
- ![イメージ説明](20ea9e96efad4fbb9b98a120ff6e4b05.png)
87
+ ![イメージ説明](8002a390c4126e969ed5f23b65076658.png)
88
88
  ```ここに言語を入力
89
89
  <!-- トップバー -->
90
90
  <nav class="navbar px-3 py-5 bg-light border-bottom shadow-sm position-static justify-content-center" id="navbar">

3

add pics

2021/10/28 15:03

投稿

utasan_1008
utasan_1008

スコア56

title CHANGED
File without changes
body CHANGED
@@ -84,6 +84,7 @@
84
84
  ```
85
85
 
86
86
  ### 変更後
87
+ ![イメージ説明](20ea9e96efad4fbb9b98a120ff6e4b05.png)
87
88
  ```ここに言語を入力
88
89
  <!-- トップバー -->
89
90
  <nav class="navbar px-3 py-5 bg-light border-bottom shadow-sm position-static justify-content-center" id="navbar">

2

add code

2021/10/28 15:01

投稿

utasan_1008
utasan_1008

スコア56

title CHANGED
File without changes
body CHANGED
@@ -81,4 +81,78 @@
81
81
  }
82
82
  /* <- header-bar icon -> */
83
83
 
84
+ ```
85
+
86
+ ### 変更後
87
+ ```ここに言語を入力
88
+ <!-- トップバー -->
89
+ <nav class="navbar px-3 py-5 bg-light border-bottom shadow-sm position-static justify-content-center" id="navbar">
90
+ <div class="navbar-brand toggle-menu position-absolute start-0">
91
+ <button class="btn btn-light btn-sm" id="sidebarToggler">
92
+ <i class="fas fa-bars fa-lg" id="sidebarTogglerFa"></i>
93
+ </button>
94
+ </div>
95
+
96
+ <!-- 中央画像 -->
97
+ <!-- text-muted mx-auto -->
98
+ <a class="nav-item-image" href="/">
99
+ <img src="{{ STATIC_URL }}img/header2.jpg" class="text-muted" width="200" height="50" alt="サンプル">
100
+ </a>
101
+
102
+ <ul class="navbar-nav d-flex flex-row position-absolute end-0">
103
+ <li class="nav-item-underline ml-3 text-muted">
104
+ <a class="p-2 link-secondary" href="#" style="text-decoration:none;">ABOUT</a>
105
+ </li>
106
+ <li class="nav-item-underline ml-3 text-muted">
107
+ <a class="p-2 link-secondary" href="#" style="text-decoration:none;">CONTACT</a>
108
+ </li>
109
+ <li class="nav-item-login mx-3 text-muted">
110
+ LOGIN
111
+ </li>
112
+ </ul>
113
+ </nav>
114
+ <!-- トップバー -->
115
+ ```
116
+ ```ここに言語を入力
117
+ .navbar-nav {
118
+ right: 0px; /* 右からの位置指定 */
119
+ /* top: 38%; */
120
+ font-family: "001Shirokuma-Regular";
121
+ font-size: large;
122
+ }
123
+
124
+ .nav-item-image {
125
+ text-align: center;
126
+ /* position: absolute; */
127
+ /* right: 50%; 右からの位置指定 */
128
+ /* top: 50px; */
129
+ }
130
+
131
+ /* <- menu icon -> */
132
+ .nav-item-menu {
133
+ position: relative;
134
+ display: inline-block;
135
+ text-decoration: none;
136
+ font-family: "001Shirokuma-Regular";
137
+ font-size: large;
138
+ }
139
+
140
+ .nav-item-menu::after {
141
+ position: absolute;
142
+ left: 17%;
143
+ content: "";
144
+ width: 65%;
145
+ height: 1.5px;
146
+ background: #000000;
147
+ bottom: 10px;
148
+ opacity: 0;
149
+ visibility: hidden;
150
+ transition: 0.3s;
151
+ }
152
+
153
+ .nav-item-menu:hover::after {
154
+ visibility: visible;
155
+ bottom: 5px;
156
+ opacity: 1;
157
+ }
84
158
  ```

1

dddcode

2021/10/28 15:01

投稿

utasan_1008
utasan_1008

スコア56

title CHANGED
File without changes
body CHANGED
@@ -39,4 +39,46 @@
39
39
  <!-- トップバー -->
40
40
  </div>
41
41
  </main>
42
+ ```
43
+
44
+ ```CSS
45
+ a {
46
+ font-family: "001Shirokuma-Regular";
47
+ font-size: large;
48
+ }
49
+
50
+ .navbar-nav {
51
+ position: absolute;
52
+ right: 0px; /* 右からの位置指定 */
53
+ top: 50px;
54
+ }
55
+
56
+ /* <- header-bar icon -> */
57
+ .nav-item-underline {
58
+ position: relative;
59
+ display: inline-block;
60
+ text-decoration: none;
61
+ font-size: large;
62
+ }
63
+
64
+ .nav-item-underline::after {
65
+ position: absolute;
66
+ left: 0;
67
+ content: "";
68
+ width: 100%;
69
+ height: 2px;
70
+ background: #000000;
71
+ bottom: 0px; /*アンダーラインが現れ始める位置(aタグの下辺からの高さ)*/
72
+ opacity: 0;
73
+ visibility: hidden;
74
+ transition: 0.3s;
75
+ }
76
+
77
+ .nav-item-underline:hover::after {
78
+ visibility: visible;
79
+ bottom: -3px;
80
+ opacity: 1;
81
+ }
82
+ /* <- header-bar icon -> */
83
+
42
84
  ```