Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

167
Views
¿Cómo hacer que el último elemento de cada fila con envoltura flexible ocupe el espacio restante?

Estoy tratando de descubrir cómo asegurarme de que el último elemento de cada fila ocupe el espacio restante de la fila en la que se encuentra. He jugado con el ancho y otras propiedades flexibles, pero no pude obtener esto para trabajar.

El último elemento actualmente no ocupa el resto del espacio en la fila.

img1

¿Qué estoy haciendo mal?

serverless-moon-wx68rx

 const styles = { container: { padding: "1rem", border: "1px solid black", height: "100%", display: "flex", flexWrap: "wrap" }, box: ({ index }) => ({ height: "2rem", width: index % 2 === 0 ? "3rem" : index % 3 === 0 ? "5rem" : "7rem", border: "1px solid gray", margin: "1rem" }) }; export default function App() { return ( <div style={styles.container}> {Array.from({ length: 7 }, (_, index) => { return <div style={styles.box({ index })} />; })} </div> ); }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!