Hue background is a concept of a new design methodology that focuses on clean and aesthetic looking UI. It gives the website a clean and aesthetic look. It is perfect for professional websites such as some product landing page or some organization’s home page. It also has an advanced version in which the color keeps changing and we will be looking at the advanced part only as you can make the basic one if you know how to make the advanced background.
Approach:The approach is to give a gradient background and making some borders to give it a shiny reflection kind of look. For advanced concepts, we will use keyframes to change the background color.
HTML Code:In this part, we have created a section.
CSS Code:For CSS, follow the below given steps.
- Step 1: Apply a basic gradient background using linear-gradient
- Step 2: Now apply animation property with a identifier named as animate
- Step 3: Now use keyframes to rotate hue at any angle of your choice using hue-rotate.This will make the color change at each frame.We have divide the frames in three parts but you can choose to divide it according to your need
- Step 4: Now use beforeselector to create left side border emerging from top.
- Step 5: Now use afterselector to create right side border emerging from top.
Tip:The keyframes step is completely optional if you want basic background. The borders which give a reflective effect can be of different types. We have chosen to use the borders which are emerging from the top. You can change their emerging direction and almost everything according to your need and creativity.
Complete Code:It is the combination of the above two sections of code.
- CSS | hue-rotate() Function
- p5.js | hue() function
- Node Jimp | Color hue
- Difference between background and background-color
- CSS | Background
- CSS | background-origin property
- Set the opacity only to background color not on the text in CSS
- How to set multiple background images using CSS?
- CSS | background-color Property
- CSS | background-repeat Property
- CSS | background-clip Property
- CSS | background-blend-mode Property
- How to give text or an image transparent background using CSS?
- CSS | background-attachment Property
- CSS | background-position Property
- CSS | background-size Property
- CSS | background-image Property
- Set the size of background image using CSS ?
- How to stretch and scale background image using CSS?
- JQuery | Setting background-image using CSS property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.