In this project, we are going to change the background color with the help of the Color Picker.
Glimpse of the Project:
- Create an HTML file in which we are going to add the text and a color picker which helps to change the background color of our web-page.
- Create a CSS style to give some animation effects to the web-page elements.
- Firstly, create an HTML file (index.html).
- Then we link the CSS (style.css) file that provides all the animations effect to our HTML page. This is also placed in between the <head> tag.
- We add a link from Google Fonts to use a different type of font family in our project.
- Then we have to add an input tag so that we can use a color picker!
- At the end of the body tag, we have to add 2 <script> tags. One for our index.js file and the other for the icon that we have used on our webpage.
CSS: The following is the code for the “style.css” file used above in the HTML code. CSS is used to give different types of animations and effects to our HTML page so that it looks interactive to all users.
- Restore all the browser effects.
- Use classes and ids to give effects to HTML elements.
- Use of :hover to use hover effects.
- Use of @keyframes to use animations on our webpage.
Returns the first element that matches with specified CSS selector:
Returns all the elements that matches with specified HTML ID: