Use multiple background images on single page
<style>
body{
background-image: url('image.svg'), url('https://www.tdbschool.com/img/tdb-logo.jpg');
}
</style>
<style>
body{
background-image: url('image.svg') right bottom no-repeat,
url('https://www.tdbschool.com/img/tdb-logo.jpg right bottom no-repeat,');
}
</style>
<!DOCTYPE html>
<html>
<head>
<style>
div{background-color:black;
background-size:200px;
background-image: url('image.svg'), url('https://www.tdbschool.com/img/tdb-logo.jpg');
background-position: right bottom, left top;
background-repeat: no-repeat, repeat;
height:380px;}
</style>
</head>
<!--Body-->
<body>
<div></div>
</body>
</html>
Learn how to use background-attachment property
<style>
div{background-image: url("image.svg");
background-repeat: no-repeat;
background-attachment: fixed;
}
</style>
<!DOCTYPE html>
<html>
<head>
<style>
div{
background-image: url("image.svg");
background-repeat: no-repeat;
background-attachment: fixed;
height:400px;
Background-color:black;
}
</style>
</head>
<!--Body-->
<body>
<div></div>
</body>
</html>
Use background clipping property on your web page
<style>
div{
border: 10px dotted black;
padding: 15px;
background: lightblue;
background-clip: padding-box;
}
</style>
<!DOCTYPE html>
<html>
<head>
<style>
div{border: 10px dotted black;
padding: 15px;
background: green;
background-clip: padding-box;
background-size:200px;
height:380px;
border-radius:5px}
</style>
</head>
<!--Body-->
<body>
<div></div>
</body>
</html>
Use background-blend-mode on background image
<style>
body{
background-image: url("img1.jpg"), url("img2.jpg");
background-repeat: no-repeat, repeat;
background-blend-mode: lighten;
}
</style>
Note: Edge/Internet Explorer do not support the background-blend-mode property.
<!DOCTYPE html>
<html>
<head>
<style>
body{color:rgb(255,255,255);
background-image: url("https://www.tdbschool.com/img/tdb-logo.jpg"), url("image.svg");
background-repeat: repeat, repeat;
background-blend-mode: lighten;
background-size:200px;
height:380px;
border-radius:5px}
</style>
</head>
<!--Body-->
<body>
<div></div>
</body>
</html>
Learn to use background opacity property
<style>
div{
background:bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip bg-attachment initial|inherit;
opacity: 0.5;
}
</style>
<style>
div{background-color:back;
opacity: 0.5;
height:200px;
}
</style>
<!DOCTYPE html>
<html>
<head>
<!--internal style-->
<style>
div{background-image:url('image.svg');
background-color:black;
background-repeat:no-repeat;
background-size:200px;
height:380px;
opacity:0.5;
}
</style>
</head>
<!--body-->
<body>
<div>
</div>
</body>
</html>
Share TDB SCHOOL
Share this E-Learning Website on social media platforms with your friends and followers