たとえばこう
HTML
1<a href="new.htm#yellow">yellow</a>
2<a href="new.htm#lime">lime</a>
3<a href="new.htm#aqua">aqua</a>
HTML
1<script>
2$(function(){
3 $('html,body').animate({scrollTop:0 }, 0)
4 .delay(1000).animate({scrollTop:$(location.hash).offset().top }, 1000, 'swing');
5});
6</script>
7
8<div style="height:1000px;background-Color:yellow" id="yellow">yellow</div>
9<div style="height:1000px;background-Color:lime" id="lime">lime</div>
10<div style="height:1000px;background-Color:aqua" id="aqua">aqua</div>
11
※一部修正
1秒間表示してから移動することにしました。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/02/21 07:15
2018/02/21 07:21