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

質問編集履歴

2

css追加しました。

2019/05/24 09:12

投稿

panda
panda

スコア20

title CHANGED
File without changes
body CHANGED
@@ -192,7 +192,102 @@
192
192
  }());
193
193
  ```
194
194
 
195
+ ```css
196
+ /*====================================
197
+
198
+ 1. Sidebar
199
+
200
+ ====================================*/
201
+ .sidebar {
202
+ position: fixed;
203
+ top: 0;
204
+ bottom: 0;
205
+ left: 0;
206
+ z-index: 100; /* ナビゲーションバーの背面 */
207
+ box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
208
+ text-align: center;
209
+ }
210
+ .logo {
211
+ font-weight: 700;
212
+ margin-bottom: 2em;
213
+ text-transform: uppercase;
214
+ font-size: 32px;
215
+ }
195
216
 
217
+ .sidebar-sticky {
218
+ position: relative;
219
+ top: 0;
220
+ height: calc(100vh - 48px);
221
+ overflow: hidden;
222
+ }
223
+ .nav-item {
224
+ margin-bottom: 10px;
225
+ list-style: none;
226
+ }
227
+
228
+ .nav-link {
229
+ color: #3C474E;
230
+ display: inline-block;
231
+ font-size: 13px;
232
+ font-weight: 600;
233
+ letter-spacing: .2em;
234
+ position: relative;
235
+ padding: 10px 10px;
236
+ }
237
+ .nav-link::after {
238
+ content: "";
239
+ position: absolute;
240
+ height: 2px;
241
+ bottom: 7px;
242
+ left: 10px;
243
+ right: 12px;
244
+ background-color: #885988;
245
+ visibility: hidden;
246
+
247
+ -webkit-transform: scaleX(0);
248
+ -moz-transform: scaleX(0);
249
+ -ms-transform: scaleX(0);
250
+ -o-transform: scaleX(0);
251
+ transform: scaleX(0);
252
+
253
+ -webkit-transition: all .3s cubic-bezier(.175, .885, .32, 1.275);
254
+ -moz-transition: all .3s cubic-bezier(.175, .885, .32, 1.275);
255
+ -ms-transition: all .3s cubic-bezier(.175, .885, .32, 1.275);
256
+ -o-transition: all .3s cubic-bezier(.175, .885, .32, 1.275);
257
+ transition: all .3s cubic-bezier(.175, .885, .32, 1.275);
258
+ }
259
+ .nav-link:hover {
260
+ color: #000;
261
+ }
262
+ .nav-link.active::after,
263
+ .nav-link:hover::after {
264
+ visibility: visible;
265
+
266
+ -webkit-transform: scaleX(1);
267
+ -moz-transform: scaleX(1);
268
+ -ms-transform: scaleX(1);
269
+ -o-transform: scaleX(1);
270
+ transform: scaleX(1);
271
+ }
272
+
273
+ .footer {
274
+ position: absolute;
275
+ bottom: 130px;
276
+ font-size: 14px;
277
+ text-align: center;
278
+ width: 100%;
279
+ font-weight: 400;
280
+ color: rgba(0, 0, 0, 0.6);
281
+ padding: 0 10px;
282
+ }
283
+
284
+ .sns-icon li a {
285
+ color: rgba(0, 0, 0, 0.6);
286
+ }
287
+
288
+ ```
289
+
290
+
196
291
  ### 試したこと
197
292
 
198
293
  data-scroll-header の位置を <div id="side-navber" class="sidebar-sticky">

1

タグ追加

2019/05/24 09:12

投稿

panda
panda

スコア20

title CHANGED
File without changes
body CHANGED
File without changes