Html & Script

상단 고정 스크립트 팁

컨텐츠 정보

본문

<script type="text/javascript">
jQuery(function($){
    $(window).scroll(function(){
        if ($(this).scrollTop() > 높이) {
            $('#대상 ID').css({position:'fixed',zIndex:60,top:0,right:0,left:0});
        } else {
            $('#대상 ID').css({position:'static'});
        };
    });
});
</script>

요렇게 위에 선언해주시고 알맞게 수정해주시면 된답니다.

관련자료

댓글 0
등록된 댓글이 없습니다.
Today's proverb
넘어지려할 때 쓰러지는 방향으로 패달을 더욱 힘차게 밟는 것,