html
1<body> 2<div id="header"> 3<!-- 140pxのヘッダー --> 4</div> 5<div id="fixed_br"> 6<!-- 140pxの余白 --> 7</div> 8</body> 9<!-- 以下スタイルシートに記入 10#header{ 11 display:block; 12 position: fixed; 13 top: 0px; 14 left: 0px; 15 width: 100%; 16 height: 140px; 17 background-color:#000000; 18 } 19#fixed_br{ 20 height:280px; 21 width:100%; 22 background-color:#ffffff; 23 } 24-->
このようにヘッダーを消してそこを空白にして
上部に固定されるようにしました。
例えば
html
1<body> 2<ul> 3<li><a href="example">example</a></li> 4</ul> 5<p> 6example 7example 8example 9example 10example 11example 12example 13example 14example 15example 16example 17example 18example 19</p> 20<div id="sample">JUMP!!</div> 21</body>
のようにJUMP!まで進むように<a href="#exmample">でタグ付けした場合
固定ページ140px分(HTML外のため)下にずれてしまいます。
ずれを修復したいのですがどうすればいいのでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/01/12 02:20
2016/01/12 02:59
退会済みユーザー
2016/01/12 03:23