This is a solution to the Interactive rating component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Select and submit a number rating
- See the "Thank you" card state after submitting a rating
- Desktop:
- Mobile:
- Solution URL: Frontend Mentor
- Live Site URL: Github
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
I have learned a way to customize my own radio buttons! Basically the code:
<label>
<input type="radio" name="Name" value="Content">
<span>Content</span>
</label>
/* Remove the default button */
input {
display: none;
}
/* Customized button */
span {
/* Button design */
}
span:hover {
/* Button design when hovered */
}
label input:checked ~ span {
/* Button design after checked */
}
- How To - Custom Checkbox - This helped me customize the radio buttons in the project.