This is a solution to the Interactive rating component on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Note: Delete this note and update the table of contents based on what sections you keep.
Users should be able to:
- View the optimal layout for the site depending on their device's screen size
- Select a rating and display it on screen after pressing a submit button
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- Vanilla Javascript
How to add interactivity to the html, basic DOM manipulation, how to add and remove classes using javascript and more flexbox
.submitted-form {
display: none;
justify-content: center;
align-items: center;
flex-direction: column;
}
scores.forEach((score) => {
score.addEventListener("click", () => {
final_score.innerHTML = score.innerHTML;
});
});
- Flexbox Malven - Useful flexbox reference as always
- MDN - MDN the best documentation
- Frontend Mentor - @nicolasfig