Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

198
Visualizações
How to show a specific image from a group as the one in focus

Greetings fellow nerds,

Hope you had a great thanksgiving. I have been working on my portfolio website lately and have almost completed it. Luckily this time I saved the best problem for last, but I haven't had any luck hacking it.. so hopefully one of you has a helpful answer.

So here's the problem:

I have a slider on my front page which at the moment shows the slider starting from the top of the 1st image. Which makes sense of course. But what if I would wish to have it start in focus on the 2nd image?

I tried something with the index without any luck. But here's two pictures that can hopefully help explain the problem:

Bad: image1

Good: imag2

Scroll container code:

import React from "react";
import { ProjectData } from "../projects/ProjectData";
import ProjectImage from "./ProjectImage";
import ScrollContainer from "react-indiana-drag-scroll";

import "./scss/ProjectCarousel.scss";

export default function ProjectCarousel() {
  return (
    <ScrollContainer className="scroll-container">
      {ProjectData.map(({ id, ...otherProps }) => (
        <ProjectImage key={id} {...otherProps} />
      ))}
    </ScrollContainer>
  );
}

Project image component code:

import React from "react";
import GitIcon from "../soMe/icons/github_legend.png";
import "./scss/Project.scss";

export default function ProjectImage({ imageUrl, alt, github, 
webUrl }) {
  return (
    <div className="image">
      <a href={webUrl} alt="Go to this project's website">
        <img src={imageUrl} alt={alt} />
        <a href={github} alt="See project on Github">
          <div className="overlay">
            <img src={GitIcon} alt={alt} />
          </div>
        </a>
      </a>
    </div>
  );
 }

Appreciate any hints or solutions

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The images required a fixed height to be rendered and picked up by the scrollto

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda