Stretch Image

<!DOCTYPE html>
<html>
<head>
<title>effecte</title>
</head>
<body>
<div class="imgBx">
<img src="1.jpeg">
<img src="2.jpg">
</div>
</body>
</html>
<style type="text/css">
body{
margin: 0px;
padding: 0px;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.imgBx{
position: relative;
width: 500px;
height: 500px;
overflow: hidden;
}
.imgBx img{
position: absolute;
top: 0px;
left:0px;
width: 100%;
height: 100%;
background-size: cover;
transition: 0.5s;
}
.imgBx:hover img:nth-child(2)
{transform: translateX(-50%) scaleX(2); opacity: 0; filter: blur(10px);}
.imgBx img:nth-child(1)
{transform: translateX(50%) scaleX(2); opacity: 0; filter: blur(10px);}
.imgBx:hover img:nth-child(1)
{transform: translateX(0) scaleX(2); opacity: 1; filter: blur(0px);}
</style>

Comments

Popular posts from this blog

Right click disable

Moutain

Input Placeholder