Image Hover FullScreen Zoom
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="STYLESHEET" type="text/css" href="web.css">
<title>web design</title>
</head>
<body>
<h1>Image Hover Fullscreen Zoom</h1>
<p>Hover over the image to see the zoom effect.
</p>
<div class="container">
<img src="man.png"alt="man">
<div class="overlay">
<div class="text">Text</div>
</div>
</div>
</body
</html>>
CSS Image Hover FullScreen Zoom Style
.container{
position: relative;
width: 50%;
}
img{
display: block;
width:100%;
height: auto;
}
.overlay{
position: absolute;
bottom:0;
left:0;
right:0;
background-color: #008cba;
overflow: hidden;
width:100%;
height:100%;
-webkit-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
-webkit-transition:3s ease ;
transition:3s ease;
}
.container:hover .overlay{
-webkit-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
}
.text{
color:white;
font-size:20px;
position: absolute;
top:50%;
left:50%;
-webkit-transition:-50%, -50%;
-ms-transition:-50%, -50%;
transition:-50%, -50%;
}
No comments:
Post a Comment