Submitted over 2 years ago
Responsive site using css y react and taildwind css
@DavidXploidz
Design comparison
SolutionDesign
Solution retrospective
What did you find difficult while building the project? How would you manipulate the background color when a modal is active?
Community feedback
- @ccreusatPosted over 2 years ago
Hi ! Nice job!
To set the modal backdrop (background), you can add a React.Fragment in your file
Bamboo.jsx
to wrap your modalclassName="modal-oculto ..."
and add a new div in position:fixed right after your modal.I did something like this for my challenge :
.modal-backdrop { position: fixed; inset: 0; z-index: 1; background-color: rgb(0 0 0 / 50%); }
Ejemplo :
{mostrarModal && ( <div className='modal-oculto ...'>...</div> <div className="modal-backdrop"></div> )}
Hope my comment helps :)
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord