Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yashi-singh-1/day-38-change-background-color-on-click

A simple Web Page with buttons to change the background color of the body, a container, or both. each button click applies a randomly selected gradient, enhancing the visual experience using JavaScript and CSS.
https://github.com/yashi-singh-1/day-38-change-background-color-on-click

coding-challenge css css3 eventlistener front-end frontend html html-css html-css-javascript html-css-js html5 htmlcss htmlcssjs interactive-ui javascript random-colors vanilla-javascript vanillajavascript web-developement webdevelopement

Last synced: about 2 months ago
JSON representation

A simple Web Page with buttons to change the background color of the body, a container, or both. each button click applies a randomly selected gradient, enhancing the visual experience using JavaScript and CSS.

Awesome Lists containing this project

README

        

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.