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

194
Visualizações
Simple HTML CSS code to ReactJS Conversion

I am new to ReactJS. I want help in converting the following simple HTML/CSS code into ReactJS. I want to have 3 CSS cards on my website with 2 places on top row and 1 in the center. Please help.

.card {
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  transition: 0.3s;
  width:40%;
  height: 30%;
}

.card:hover {
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}

.container {
  padding: 2px 16px;
}
<h2>Card</h2>

<div style="display: flex; justify-content: space-between; margin-top:100px; margin-right:150px; margin-left: 150px">
  <div class="card">
    <a href="https://www.google.com"><img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar"
        style="width:100%"></a>
  </div>

  <div class="card">
    <img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar" style="width:100%">
  </div>

</div>

<div style="display: flex; justify-content: center; margin-top:100px; margin-right:150px; margin-left: 150px">
  <div class="card">
    <a href="https://www.google.com"><img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar"
        style="width:100%"></a>
  </div>
</div>

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

0

Technically you can make a React website which looks like the way you want it. For this you have to create a card component in ReactJs and you can write jsx for the above HTML and css will be the same. just import it in your component. Your card component will look something like this:

import React from 'react';
import './styles.css';

function card() {
  return (
    <div>
      <h2>Card</h2>

      <div style={{display: flex; justifyContent: spaceBetween; marginTop:100px; marginRight:150px; marginLeft: 150px}}>
        <div className="card">
          <a href="https://www.google.com"><img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar"
              style="width:100%"/></a>
        </div>

        <div className="card">
          <img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar" style="width:100%"/>
        </div>

      </div>

      <div style={{display: flex; justifyContent: center; marginTop:100px; marginRight:150px; marginLeft: 150px}}>
        <div className="card">
          <a href="https://www.google.com"><img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar"
              style={{width:100%}}/></a>
        </div>
      </div>
    </div>
  )
}

export default card;

save your css in the same folder.

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