Loading Please Wait...
CSS allow us to handle background graphics of the elements. We can set color, image, size, etc. of the element. CSS has background or background-* properties for the background.
Sets the background color of the selected element. Default is transparent
We can give any color value like name, HEX, HEXA, RGB, RGBA, HSL, HSLA, etc.
Syntax = background-color: red;
p{
background-color: red;
}
Sets the background image of the selected element. Default is none
Syntax = background-image: url("image.png");
div{
background-image: url("image.png");
}
Sets the position of background image of the selected element. Default is scroll
Syntax = background-attachment: fixed;
div{
background-attachment: fixed;
}
Sets how the background image is repeated of the selected element. Default is repeat
Syntax = background-repeat: no-repeat;
div{
background-repeat: no-repeat;
}
Sets the initial position of the background image of the selected element. Default is 0% 0%
Syntax = background-position: center;
div{
background-position: center;
}
Sets the size of the background image of the selected element. Default is auto
Syntax = background-size: contain;
div{
background-size: contain;
}
Sets whether the background is underneath of border box, padding box, or content box. Default is border-box
Syntax = background-clip: padding-box;
div{
background-clip: padding-box;
}
Sets origin of the background. Default is padding-box
Syntax = background-origin: content-box;
div{
background-origin: content-box;
}
Sets blending of background images and color of the element. Default is normal
Syntax = background-origin: luminosity;
div{
background-origin: darken;
}
We can set multiple background properties in a single line using background property.
div{
background: url("image.png") #fd3ea4 no-repeat right top;
}
How you feel about this blog:
Share this blog on:
If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com
Contact UsWe are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..
Copyright ©
, Lynxsia IT Solutions, All rights reserved