Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 2.05 KB

File metadata and controls

55 lines (39 loc) · 2.05 KB

Change Background Color On-Click

Challenge Description

This challenge demonstrates how to dynamically change the background colors of the body and a container using JavaScript and CSS gradients. The user interface consists of three buttons that allow users to change the background color of the body, the container, or both simultaneously with a random gradient each time a button is clicked.

Preview

Change Background Color On-Click Preview

Live Demo

Check out the live demo here.

Prerequisites

  • Basic HTML, CSS and JavaScript Knowledge

Learning Points

  • Manipulating CSS Styles with JavaScript
  • Event Listeners

Tools Used

  1. VS Code (You can use any other code editor)
  2. A modern web browser (Chrome, Firefox, Safari, or Edge).
  3. Access to an internet connection for resource imports.

Contributing

If you'd like to contribute to this challenge:

  1. Fork the repository on GitHub.
  2. Clone your forked repository to your local machine:
  3. git clone https://github.com/Yashi-Singh-1/Day-37-Change-Background-Color-On-Click.git
  4. Create a new branch for your feature or bug fix:
  5. git checkout -b feature-name
  6. Make your changes and commit them with a clear and concise message:
  7. git commit -m 'Add new feature or fix'
  8. Push your changes to your forked repository:
  9. git push origin feature-name
  10. Open a pull request to the main repository.
  11. Ensure your pull request includes a detailed description of your changes.
  12. Respond to any feedback or questions during the review process.

We welcome improvements, bug fixes, and additional features that can enhance this Change Background Color On-Click.