I am currently working on a web page and I have attempted to use both jpg and png images as backgrounds, but they do not seem to display on the page.
import './Entrada.css'
const Entrada = () => {
return(
<div style={{
backgroundImage: "url(/secoes_02.jpg)"
}}>
<div><img src='secoes_02.jpg'/></div>
<div className='texto'>testatastastasta</div>
</div>
)
}
export default Entrada
In the code snippet above, the image can be displayed as a figure, but not as a background. Attempts to insert it using CSS rules or imports have been unsuccessful.
.geral{
background: url("/public/img/partes/secoes_02.jpg");
}
Despite various troubleshooting steps such as reinstalling Node.js packages and changing folder locations, the image still refuses to appear in my React application. Has anyone else encountered this issue?