回答編集履歴
1
コード追記
answer
CHANGED
@@ -10,4 +10,25 @@
|
|
10
10
|
padding-bottom:0.3rem;
|
11
11
|
border-bottom:1px solid #ccc;
|
12
12
|
}
|
13
|
+
```
|
14
|
+
|
15
|
+
flexを使えばいいか。
|
16
|
+
|
17
|
+
```css
|
18
|
+
header {
|
19
|
+
width:100%;
|
20
|
+
height:5rem;
|
21
|
+
margin:0 auto;
|
22
|
+
background-color:#f00;
|
23
|
+
display: flex;
|
24
|
+
justify-content: flex-end;
|
25
|
+
}
|
26
|
+
#top_bar{
|
27
|
+
position:fixed;
|
28
|
+
top:0;
|
29
|
+
margin:0;
|
30
|
+
background-color: #fff;
|
31
|
+
padding-bottom:0.3rem;
|
32
|
+
border-bottom:1px solid #ccc;
|
33
|
+
}
|
13
34
|
```
|