Hi dear welcome to Ascode Blog . In this post we are going to learn How to blend image using css. First Creat A index.html file Copy This HTML CODE and pest it one your code editor. 2ndly creat style.css file Then Copy The CSS CODE and pest it then open the index.html file with your browser.
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blend mode css</title>
</head>
<body>
<div class="container">
<img src="https://media.istockphoto.com/photos/abstract-handpainted-art-background-on-canvas-picture-id1134512518?b=1&k=20&m=1134512518&s=170667a&w=0&h=Rw8w1wEksVA2Her6kJMTkbD8Lp-8n3pZqEa-rDJaKfI=" >
</div>
</body>
</html>
CSS
body {
background: #111;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.container {
width: 300px;
}
.container img {
width: 100%;
mix-blend-mode: lighten;
}
0 Comments