質問編集履歴

2

コードを追記しました。navbarのはじめるボタンが対象です!

2020/10/15 09:11

投稿

cheetoi
cheetoi

スコア10

test CHANGED
File without changes
test CHANGED
@@ -18,82 +18,296 @@
18
18
 
19
19
  ```ここに言語を入力
20
20
 
21
- <nav class="navbar navbar-expand-lg navbar-light bg-light nav fixed-top">
22
-
23
- <a class="navbar-brand" href="https://www.airbnb.jp/">
24
-
25
- <svg width="1.3em" height="1.3em" viewBox="0 0 16 16" class="bi bi-suit-club" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
26
-
27
- <path fill-rule="evenodd" d="M8 1a3.25 3.25 0 0 0-3.25 3.25c0 .186 0 .29.016.41.014.12.045.27.12.527l.19.665-.692-.028a3.25 3.25 0 1 0 2.357 5.334.5.5 0 0 1 .844.518l-.003.005-.006.015-.024.055a21.893 21.893 0 0 1-.438.92 22.38 22.38 0 0 1-1.266 2.197c-.013.018-.02.05.001.09.01.02.021.03.03.036A.036.036 0 0 0 5.9 15h4.2c.01 0 .016-.002.022-.006a.092.092 0 0 0 .029-.035c.02-.04.014-.073.001-.091a22.875 22.875 0 0 1-1.704-3.117l-.024-.054-.006-.015-.002-.004a.5.5 0 0 1 .838-.524c.601.7 1.516 1.168 2.496 1.168a3.25 3.25 0 1 0-.139-6.498l-.699.03.199-.671c.14-.47.14-.745.139-.927V4.25A3.25 3.25 0 0 0 8 1zm2.207 12.024c.225.405.487.848.78 1.294C11.437 15 10.975 16 10.1 16H5.9c-.876 0-1.338-1-.887-1.683.291-.442.552-.88.776-1.283a4.25 4.25 0 1 1-2.007-8.187 2.79 2.79 0 0 1-.009-.064c-.023-.187-.023-.348-.023-.52V4.25a4.25 4.25 0 0 1 8.5 0c0 .14 0 .333-.04.596a4.25 4.25 0 0 1-.46 8.476 4.186 4.186 0 0 1-1.543-.298z"/>
28
-
29
- </svg>
30
-
31
- </a>
32
-
33
- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
34
-
35
- <span class="navbar-toggler-icon"></span>
36
-
37
- </button>
38
-
39
- <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
40
-
41
- <div class="navbar-nav hd-nav">
42
-
43
- <a class="nav-item nav-link active hd-nav__item" href="#">概要<span class="sr-only">(current)</span></a>
44
-
45
- <a class="nav-item nav-link hd-nav__item" href="https://www.airbnb.jp/d/setup">準備</a>
46
-
47
- <a class="nav-item nav-link hd-nav__item" href="https://www.airbnb.jp/d/safety">安全</a>
48
-
49
- <a class="nav-item nav-link hd-nav__item" href="https://www.airbnb.jp/d/financials">マネープラン</a>
50
-
51
- </div>
52
-
53
- </div>
54
-
55
- <!-- <button>modal -->
56
-
57
- <button type="button" class="btn btn-danger mr-4" data-toggle="modal" data-target="#hd-modal">はじめる</button>
58
-
59
- <div class="modal" id="hd-modal" tabindex="-1" role="dialog">
60
-
61
- <div class="modal-dialog" role="document">
62
-
63
- <div class="modal-content">
64
-
65
- <div class="modal-header">
66
-
67
- <h5 class="modal-title">ログイン</h5>
68
-
69
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
70
-
71
- <span aria-hidden="true">&times;</span>
72
-
73
- </button>
74
-
75
- </div>
76
-
77
- <div class="modal-body">
78
-
79
- <p>Modal body text goes here.</p>
80
-
81
- </div>
82
-
83
- <div class="modal-footer">
84
-
85
- <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
86
-
87
- <button type="button" class="btn btn-primary">Save changes</button>
88
-
89
- </div>
90
-
91
- </div>
92
-
93
- </div>
94
-
95
- </div>
96
-
97
- </nav>
21
+ <html lang="ja">
22
+
23
+ <head>
24
+
25
+ <meta charset="utf-8">
26
+
27
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
28
+
29
+ <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
30
+
31
+ <script src="https://kit.fontawesome.com/434bcc9383.js" crossorigin="anonymous"></script>
32
+
33
+ <link rel="stylesheet" href="css/main.css" />
34
+
35
+
36
+
37
+ <title>Boot strap1</title>
38
+
39
+ </head>
40
+
41
+ <body>
42
+
43
+ <header>
44
+
45
+ <!-- <nav class="navbar navbar-fixed-top" role="navigation"></nav> -->
46
+
47
+ <!-- nav fixed-topで上部固定ができる -->
48
+
49
+ <nav class="navbar navbar-expand-lg navbar-light bg-light nav fixed-top">
50
+
51
+ <a class="navbar-brand" href="https://www.airbnb.jp/">
52
+
53
+ <svg width="1.3em" height="1.3em" viewBox="0 0 16 16" class="bi bi-suit-club" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
54
+
55
+ <path fill-rule="evenodd" d="M8 1a3.25 3.25 0 0 0-3.25 3.25c0 .186 0 .29.016.41.014.12.045.27.12.527l.19.665-.692-.028a3.25 3.25 0 1 0 2.357 5.334.5.5 0 0 1 .844.518l-.003.005-.006.015-.024.055a21.893 21.893 0 0 1-.438.92 22.38 22.38 0 0 1-1.266 2.197c-.013.018-.02.05.001.09.01.02.021.03.03.036A.036.036 0 0 0 5.9 15h4.2c.01 0 .016-.002.022-.006a.092.092 0 0 0 .029-.035c.02-.04.014-.073.001-.091a22.875 22.875 0 0 1-1.704-3.117l-.024-.054-.006-.015-.002-.004a.5.5 0 0 1 .838-.524c.601.7 1.516 1.168 2.496 1.168a3.25 3.25 0 1 0-.139-6.498l-.699.03.199-.671c.14-.47.14-.745.139-.927V4.25A3.25 3.25 0 0 0 8 1zm2.207 12.024c.225.405.487.848.78 1.294C11.437 15 10.975 16 10.1 16H5.9c-.876 0-1.338-1-.887-1.683.291-.442.552-.88.776-1.283a4.25 4.25 0 1 1-2.007-8.187 2.79 2.79 0 0 1-.009-.064c-.023-.187-.023-.348-.023-.52V4.25a4.25 4.25 0 0 1 8.5 0c0 .14 0 .333-.04.596a4.25 4.25 0 0 1-.46 8.476 4.186 4.186 0 0 1-1.543-.298z"/>
56
+
57
+ </svg>
58
+
59
+ </a>
60
+
61
+ <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
62
+
63
+ <span class="navbar-toggler-icon"></span>
64
+
65
+ </button>
66
+
67
+ <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
68
+
69
+ <div class="navbar-nav hd-nav">
70
+
71
+ <a class="nav-item nav-link active hd-nav__item" href="#">概要<span class="sr-only">(current)</span></a>
72
+
73
+ <a class="nav-item nav-link hd-nav__item" href="https://www.airbnb.jp/d/setup">準備</a>
74
+
75
+ <a class="nav-item nav-link hd-nav__item" href="https://www.airbnb.jp/d/safety">安全</a>
76
+
77
+ <a class="nav-item nav-link hd-nav__item" href="https://www.airbnb.jp/d/financials">マネープラン</a>
78
+
79
+ </div>
80
+
81
+ </div>
82
+
83
+ <!-- <button>modal -->
84
+
85
+ <button type="button" class="btn btn-danger mr-4" data-toggle="modal" data-target="#hd-modal">はじめる</button>
86
+
87
+ <div class="modal" id="hd-modal" tabindex="-1" role="dialog">
88
+
89
+ <div class="modal-dialog" role="document">
90
+
91
+ <div class="modal-content">
92
+
93
+ <div class="modal-header">
94
+
95
+ <h5 class="modal-title">ログイン</h5>
96
+
97
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
98
+
99
+ <span aria-hidden="true">&times;</span>
100
+
101
+ </button>
102
+
103
+ </div>
104
+
105
+ <div class="modal-body">
106
+
107
+ <p>Modal body text goes here.</p>
108
+
109
+ </div>
110
+
111
+ <div class="modal-footer">
112
+
113
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
114
+
115
+ <button type="button" class="btn btn-primary">Save changes</button>
116
+
117
+ </div>
118
+
119
+ </div>
120
+
121
+ </div>
122
+
123
+ </div>
124
+
125
+ </nav>
126
+
127
+
128
+
129
+ <div class="card">
130
+
131
+ <div class="container-fluid header__card" id="hd-img"></div>
132
+
133
+ <img class="card-img" src="https://picsum.photos/seed/picsum/1200/555/" alt="#">
134
+
135
+ <div class="header__nav"></div>
136
+
137
+ </div>
138
+
139
+
140
+
141
+ <div class="container hd-card">
142
+
143
+ <div class="row">
144
+
145
+ <div class="hd-catch">
146
+
147
+ <div class="hd-catch__left col-lg-7 col-md-10">
148
+
149
+ <h1>予想最高ホスティング収入額</h1>
150
+
151
+ <p class="texts">
152
+
153
+ <span>週あたり¥60,615</span>
154
+
155
+ <span>月あたり¥98,968</span>
156
+
157
+ <span>年あたり¥1,177,968</span>
158
+
159
+ <span>10年あたり¥13,198,968</span>
160
+
161
+ </p>
162
+
163
+ <h1>NaganoのAirbnbホストとして</h1>
164
+
165
+ </div>
166
+
167
+
168
+
169
+ <div class="hd-catch__right col-lg-5 col-md-10">
170
+
171
+ <form>
172
+
173
+ <div class="form-group">
174
+
175
+ <label for="exampleInputEmail1">どれくらいの収益が見込めるかみていきましょう</label>
176
+
177
+ <input type="text" class="form-control" id="formGroupExampleInput" placeholder="宿泊施設の所在地">
178
+
179
+ </div>
180
+
181
+ <div class="row">
182
+
183
+ <div class="dropdown col-lg-6 col-md-10">
184
+
185
+ <button class="btn btn-light dropdown-toggle"
186
+
187
+ type="button" id="dropdownMenu1" data-toggle="dropdown"
188
+
189
+ aria-haspopup="true" aria-expanded="false">
190
+
191
+ まるまる貸し切り
192
+
193
+ </button>
194
+
195
+ <div class="dropdown-menu" aria-labelledby="dropdownMenu1">
196
+
197
+ <a class="dropdown-item" href="#!">個室</a>
198
+
199
+ <a class="dropdown-item" href="#!">シェアルーム</a>
200
+
201
+ </div>
202
+
203
+ </div>
204
+
205
+
206
+
207
+ <div class="dropdown col-lg-6 col-md-10">
208
+
209
+ <button class="btn btn-light dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
210
+
211
+ ゲスト4人
212
+
213
+ </button>
214
+
215
+ <div class="dropdown-menu" aria-labelledby="dropdownMenu1">
216
+
217
+ <a class="dropdown-item" href="#!">ゲスト1人</a>
218
+
219
+ <a class="dropdown-item" href="#!">ゲスト2人</a>
220
+
221
+ <a class="dropdown-item" href="#!">ゲスト3人</a>
222
+
223
+ <a class="dropdown-item" href="#!">ゲスト4人</a>
224
+
225
+ <a class="dropdown-item" href="#!">ゲスト5人</a>
226
+
227
+ <a class="dropdown-item" href="#!">ゲスト6人</a>
228
+
229
+ <a class="dropdown-item" href="#!">ゲスト7人</a>
230
+
231
+ <a class="dropdown-item" href="#!">ゲスト8人</a>
232
+
233
+ <a class="dropdown-item" href="#!">ゲスト9人</a>
234
+
235
+ <a class="dropdown-item" href="#!">ゲスト10人</a>
236
+
237
+ <a class="dropdown-item" href="#!">ゲスト11人</a>
238
+
239
+ <a class="dropdown-item" href="#!">ゲスト12人</a>
240
+
241
+ <a class="dropdown-item" href="#!">ゲスト13人</a>
242
+
243
+ <a class="dropdown-item" href="#!">ゲスト14人</a>
244
+
245
+ <a class="dropdown-item" href="#!">ゲスト15人</a>
246
+
247
+ <a class="dropdown-item" href="#!">ゲスト16人</a>
248
+
249
+ </div>
250
+
251
+ </div>
252
+
253
+ <button type="button" class="btn btn-danger btn-lg btn block hd-entry">はじめる</button>
254
+
255
+ </div>
256
+
257
+ </div>
258
+
259
+ </div>
260
+
261
+ </div>
262
+
263
+ </div>
264
+
265
+ </header>
266
+
267
+ <div class="container hd-section">
268
+
269
+ <div class="row justify-content-center">
270
+
271
+ <div class="col-xl-5 col-md-8 hd-section__left">
272
+
273
+ <h1>Airbnbでホストするこれだけの理由</h1>
274
+
275
+ <p>どんなお家やお部屋でも、Airbnbなら簡単かつ安全にシェアでき、世界中の旅好きな仲間とつながれます。 予約可能日から料金、ハウスルール、ゲストとの交流程度まで、すべて自分で決めることができます。</p>
276
+
277
+ </div>
278
+
279
+ <div class="col-xl-5 col-md-8 hd-section__right">
280
+
281
+ <h1>困ったときも安心</h1>
282
+
283
+ <p>万一に備えるUS$1,000,000の財物補償、US$1,000,000の賠償責任保険が全予約に自動付帯。ホストのみなさまと建物・家財の安全をお守りするため全力で取り組んでいます。</p>
284
+
285
+ </div>
286
+
287
+ </div>
288
+
289
+ </div>
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+ <script src="src/index.js"></script>
302
+
303
+ <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
304
+
305
+ <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
306
+
307
+ <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
308
+
309
+ </body>
310
+
311
+ </html>
98
312
 
99
313
  ```

1

modal近辺のコードを追加しました。

2020/10/15 09:11

投稿

cheetoi
cheetoi

スコア10

test CHANGED
File without changes
test CHANGED
@@ -18,42 +18,82 @@
18
18
 
19
19
  ```ここに言語を入力
20
20
 
21
- <div class="modal" id="hd-modal" tabindex="-1" role="dialog">
21
+ <nav class="navbar navbar-expand-lg navbar-light bg-light nav fixed-top">
22
22
 
23
- <div class="modal-dialog" role="document">
23
+ <a class="navbar-brand" href="https://www.airbnb.jp/">
24
24
 
25
- <div class="modal-content">
25
+ <svg width="1.3em" height="1.3em" viewBox="0 0 16 16" class="bi bi-suit-club" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
26
26
 
27
- <div class="modal-header">
27
+ <path fill-rule="evenodd" d="M8 1a3.25 3.25 0 0 0-3.25 3.25c0 .186 0 .29.016.41.014.12.045.27.12.527l.19.665-.692-.028a3.25 3.25 0 1 0 2.357 5.334.5.5 0 0 1 .844.518l-.003.005-.006.015-.024.055a21.893 21.893 0 0 1-.438.92 22.38 22.38 0 0 1-1.266 2.197c-.013.018-.02.05.001.09.01.02.021.03.03.036A.036.036 0 0 0 5.9 15h4.2c.01 0 .016-.002.022-.006a.092.092 0 0 0 .029-.035c.02-.04.014-.073.001-.091a22.875 22.875 0 0 1-1.704-3.117l-.024-.054-.006-.015-.002-.004a.5.5 0 0 1 .838-.524c.601.7 1.516 1.168 2.496 1.168a3.25 3.25 0 1 0-.139-6.498l-.699.03.199-.671c.14-.47.14-.745.139-.927V4.25A3.25 3.25 0 0 0 8 1zm2.207 12.024c.225.405.487.848.78 1.294C11.437 15 10.975 16 10.1 16H5.9c-.876 0-1.338-1-.887-1.683.291-.442.552-.88.776-1.283a4.25 4.25 0 1 1-2.007-8.187 2.79 2.79 0 0 1-.009-.064c-.023-.187-.023-.348-.023-.52V4.25a4.25 4.25 0 0 1 8.5 0c0 .14 0 .333-.04.596a4.25 4.25 0 0 1-.46 8.476 4.186 4.186 0 0 1-1.543-.298z"/>
28
28
 
29
- <h5 class="modal-title">ログイン</h5>
29
+ </svg>
30
30
 
31
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
31
+ </a>
32
32
 
33
- <span aria-hidden="true">&times;</span>
33
+ <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
34
34
 
35
- </button>
35
+ <span class="navbar-toggler-icon"></span>
36
36
 
37
- </div>
37
+ </button>
38
38
 
39
- <div class="modal-body">
39
+ <div class="collapse navbar-collapse" id="navbarNavAltMarkup">
40
40
 
41
- <p>Modal body text goes here.</p>
41
+ <div class="navbar-nav hd-nav">
42
42
 
43
- </div>
43
+ <a class="nav-item nav-link active hd-nav__item" href="#">概要<span class="sr-only">(current)</span></a>
44
44
 
45
- <div class="modal-footer">
45
+ <a class="nav-item nav-link hd-nav__item" href="https://www.airbnb.jp/d/setup">準備</a>
46
46
 
47
- <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
47
+ <a class="nav-item nav-link hd-nav__item" href="https://www.airbnb.jp/d/safety">安全</a>
48
48
 
49
- <button type="button" class="btn btn-primary">Save changes</button>
49
+ <a class="nav-item nav-link hd-nav__item" href="https://www.airbnb.jp/d/financials">マネープラン</a>
50
50
 
51
- </div>
51
+ </div>
52
52
 
53
- </div>
53
+ </div>
54
54
 
55
- </div>
55
+ <!-- <button>modal -->
56
56
 
57
+ <button type="button" class="btn btn-danger mr-4" data-toggle="modal" data-target="#hd-modal">はじめる</button>
58
+
59
+ <div class="modal" id="hd-modal" tabindex="-1" role="dialog">
60
+
61
+ <div class="modal-dialog" role="document">
62
+
63
+ <div class="modal-content">
64
+
65
+ <div class="modal-header">
66
+
67
+ <h5 class="modal-title">ログイン</h5>
68
+
69
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
70
+
71
+ <span aria-hidden="true">&times;</span>
72
+
73
+ </button>
74
+
57
- </div>
75
+ </div>
76
+
77
+ <div class="modal-body">
78
+
79
+ <p>Modal body text goes here.</p>
80
+
81
+ </div>
82
+
83
+ <div class="modal-footer">
84
+
85
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
86
+
87
+ <button type="button" class="btn btn-primary">Save changes</button>
88
+
89
+ </div>
90
+
91
+ </div>
92
+
93
+ </div>
94
+
95
+ </div>
96
+
97
+ </nav>
58
98
 
59
99
  ```