<header>
<nav>
<ul>
<li data-menuanchor="section1"><a href="#section1">section 1</a></li>
<li data-menuanchor="section2"><a href="#section2">section 2</a></li>
<li data-menuanchor="section3"><a href="#section3">section 3</a></li>
<li data-menuanchor="section4"><a href="#section4">section 4</a></li>
<li data-menuanchor="footer"><a href="#footer">footer</a></li>
</ul>
</nav>
$(function () {
$('#fullpage').fullpage({
anchors: ['section1','section2','section3','section4','footer'],
});
})
<main id="fullpage">
<section class="section">
<h2>section 1</h2>
</section>
<section class="section">
<div class="slide">
<h3>slide 01</h3>
</div>
<div class="slide">
<h3>slide 02</h3>
</div>
<div class="slide">
<h3>slide 03</h3>
</div>
</section>
<section class="section">
<h2>section 3</h2>
</section>
<section class="section">
<h2>section 4</h2>
</section>
<footer class="section fp-auto-height">
<h2>footer</h2>
<p>
요건 <br />
높이 약간 <br />
올리기 위한 용
</p>
</footer>
</main>
$(function () {
$('#fullpage').fullpage({
anchors: ['section1','section2','section3','section4','footer'],
autoScrolling:true,
navigation: true,
navigationPosition: 'right',
sectionsColor: ['#6fd1ab', '#7ae2ba', '#95efcc', '#aff9dd', '#d9fff0'],
loopBottom: true,
slidesNavigation: true,
slidesNavPosition: 'top'
});
})
.fp-slidesNav{
position: absolute;
z-index: 4;
opacity: 1;
-webkit-transform: translate3d(0,0,0);
-ms-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
left: 50% !important;
transform: translateX(-50%);
/* right: 0; */
margin: 0 auto !important;
}
.fp-controlArrow {
padding: 1rem;
box-shadow: 1px -1px 0 1px #fff inset;
-webkit-box-shadow: 2px -2px #fff inset;
border: solid transparent;
transition: 0.2s;
}
.fp-controlArrow:hover{
box-shadow: 2px -2px 0 2px #ddd inset;
-webkit-box-shadow: 4px -4px #ddd inset;
}
.fp-controlArrow.fp-prev {
left: 50px;
border-width: 0 0 2rem 2rem;
border: solid transparent;
width: auto;
transform: rotate(45deg);
}
.fp-controlArrow.fp-next {
right: 50px;
border-width: 0 0 2rem 2rem;
border: solid transparent;
transform: rotate(225deg);
}
요즘 다양한 라이브러리에 대해 경험해보기 위해 이것저것 건들고 있는데, 생각보다 doc을 읽으면 천천히 하는 방법을 알려준다.
그리고 example을 통해 헷갈리는걸 직접 실습해보면 금방 배우게 된다. 해당 실습물로 간단한 웹사이트를 만들어보려고 한다 👧