.yourElementClass{
background: linear-gradient(to top, #fff000 0%, #000fff 100%);
/* 1st property: from where the 100% starts */
/* 2nd property: the first color */
/* 3rd property: the second color */
/* to add some colors to the gradient, do the same thing of 2nd and 3rd properties, edit the color and the color-stop */
}
/* from up to down */
.bg-gradient {
background-image: linear-gradient(red, yellow);
}
/* from left to right */
.bg-gradient {
background-image: linear-gradient(to right, red, yellow);
}
background: linear-gradient(to top left, #28b487, #7dd56f);
//Build a gradient and copy the CSS code to use wherever!
// https://cssgradient.io/
//example:
body{
background: rgb(2,0,36);
background: linear-gradient(90deg, rgba(2,0,36,0.3) 13%, rgba(0,212,255,1) 18%, rgba(0,212,255,1) 96%, rgba(0,9,89,0.3) 100%);
}
background-image: linear-gradient(to bottom, rgba(45,45,45,0) 92%, rgba(128,128,128,0.4));
//No need of extra divs
background: repeating-linear-gradient(to right top, rgb(0, 102, 255), rgb(0, 204, 255));
use that website and coby the code https://cssgradient.io/
Gradient Generator:
https://freetoolssite.com/tools/gradient-creator-online
background: linear-gradient(Direction (keyword or degrees), color1 10% (10% width), color2 width (it's not neccessary), ...);
Code Example |
---|
Css :: Border property to set the LEFT border to "dotted" |
Css :: @container |
Css :: important css |
Css :: mb bootstrap |
Css :: animation left to right css |
Css :: css grid column |
Css :: display elements in column css |
Css :: max character css |
Css :: css round image without stretching |
Css :: gradient btn |
Css :: white space in css |
Css :: add border to png outline css |
Css :: crop image in div |
Css :: how to draw rhombus in css |
Css :: how make button which is fixed even after i scroll |
Css :: two classes css modules |
Css :: width in % of a screen css |
Css :: scss darken |
Css :: new line ::after class |
Css :: card flip css |
Css :: animation-direction in css |
Css :: border for text in html |
Css :: react how to wrap |
Css :: css wrap text |
Css :: css border top linear gradient |
Css :: for...of...loop |
Css :: z-index on position absolute |
Css :: liste commandes disponibles linux |
Css :: transform element to the left |
Css :: rendre une div scrollable |