Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

194
Vistas
react and next.js parallax

Hi I am trying to replicate the parallax effect from this wordpress website https://cfs-me.com/ on react and next.js.

I am trying to achieve this with react-scroll-parallax npm package.

my _app.js file is.....

import TopNav from '../components/TopNav';
import 'bootstrap/dist/css/bootstrap.min.css';
import 'antd/dist/antd.css';
import { ParallaxProvider } from 'react-scroll-parallax';
import '../public/css/styles.css';

function MyApp ({ Component, pageProps }) {
    return (
    <>
        <TopNav />
        <ParallaxProvider>
            <Component {...pageProps} />;
        </ParallaxProvider>
    </>
    )
}

export default MyApp;

and in the index.js....

import Image from 'next/image'
import { Parallax } from 'react-scroll-parallax'

const Index = () => {
    return (
        <>

            <div className="content">
                <Parallax offsetYMin={200} offsetYMax={1500}>
                    <h1 className="jumbotron text-center bg-primary titlemain">hello</h1>

                </Parallax>
                <Parallax offsetYMin={-500} offsetYMax={2000}>
                    <Image src="/public/images/tree-geec0e486b_1920.jpg" layout="fill" />
                </Parallax>

            </div>

            <style jsx>{`
              .titlemain {
              color: white;
              margin: 0;
              height: 300px;
              display: flex;
              align-items: center;
              justify-content: center;
              }
            `}</style>
        </>
    )
};

export default Index;

I cant get the image to load, and I don't quite understand the two parallax elements that I got from the docs. Chrome developer tools reads them as inner and outer. Any help would be greatly appreciated. Thanks

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda