This is a solution to the Pricing component with toggle 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 component depending on their device's screen size
- Control the toggle with both their mouse/trackpad and their keyboard
- Bonus: Complete the challenge with just HTML and CSS
- Solution URL: Frontend Mentors
- Live Site URL: Github
- Setup local environment for the project.
- Create the HTML structure with semantic HTML tags, including sections for each pricing tier and the toggle button for plans.
- Apply styles to the HTML elements, ensuring a visually appealing layout and responsiveness. Use CSS to hide the details of the toggled sections initially.
- Write JavaScript code to handle the toggle functionality. With the help of jQuery to detect when a user clicks on a toggle button, and dynamically show or hide the corresponding details.
- Use media queries for different devices to ensure responsive design.
- Start deploying to live.
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
- Media Queries
- Javascript
- Jquery
- DOM
I used two background images in the same time and managed to resize and align both differently:
body{
background-image: url("../images/bg-top.svg"), url("../images/bg-bottom.svg");
background-size: 25%, 25%;
background-position: top right, bottom left;
}
- Example resource 1 - The documentation for jQuery.
- Website - Github
- Frontend Mentor - @amrmabdelazeem