react-fullPage 커스텀

김병화·2023년 8월 10일
0

Arch

목록 보기
4/14
import styled from 'styled-components';
import { SectionsContainer, Section } from 'react-fullpage';

function Home() {
	let options = {
		anchors: ['first', 'second'],
	};

	const Wrapper = styled.div`
		.Navigation {
			right: 1px !important;
		}
	`;

	const StyledSection = styled(Section)`
		background-color: black;
		color: #eee;
	`;

	const SecondSection = styled(StyledSection)`
		margin-top: -56.5px;
	`;

	return (
      <Wrapper>
        <SectionsContainer {...options}>
          <StyledSection>Page 1</StyledSection>
          <SecondSection>Page 2</SecondSection>
        </SectionsContainer>
      </Wrapper>
	);
}

export default Home;

!important 주어야만 css 적용 됨.




참고
https://www.npmjs.com/package/react-fullpage

0개의 댓글

관련 채용 정보