回答編集履歴

1

追記

2018/01/15 08:52

投稿

yambejp
yambejp

スコア114839

test CHANGED
@@ -47,3 +47,69 @@
47
47
  </div>
48
48
 
49
49
  ```
50
+
51
+
52
+
53
+ # 追記
54
+
55
+ もうちょっと突っ込んで、ようはheaderが固定でおいてあって
56
+
57
+ 本文が隠れるのがいやなんですよね?
58
+
59
+ ```CSS
60
+
61
+ body{padding:0px;margin:0px;}
62
+
63
+ #wrap{position:relative;}
64
+
65
+ #header{background-Color:gray;color:red;position:fixed;height:1.5em;width:100%;}
66
+
67
+ .hoge{height:1000px;padding-top:1.5em;}
68
+
69
+ #hoge1{background-Color:yellow;}
70
+
71
+ #hoge2{background-Color:lime;}
72
+
73
+ #hoge3{background-Color:aqua;}
74
+
75
+ ```
76
+
77
+ ```HTML
78
+
79
+ <div id="wrap">
80
+
81
+ <div id="header">header</div>
82
+
83
+ <div id="hoge1" class="hoge">
84
+
85
+ <a href="#hoge1">1</a>
86
+
87
+ <a href="#hoge2">2</a>
88
+
89
+ <a href="#hoge3">3</a>
90
+
91
+ </div>
92
+
93
+ <div id="hoge2" class="hoge">
94
+
95
+ <a href="#hoge1">1</a>
96
+
97
+ <a href="#hoge2">2</a>
98
+
99
+ <a href="#hoge3">3</a>
100
+
101
+ </div>
102
+
103
+ <div id="hoge3" class="hoge">
104
+
105
+ <a href="#hoge1">1</a>
106
+
107
+ <a href="#hoge2">2</a>
108
+
109
+ <a href="#hoge3">3</a>
110
+
111
+ </div>
112
+
113
+ </div>
114
+
115
+ ```