As the user hovers over the image, the image enlarges. However, there is also some information that needs to be displayed in front of the image.
This is my current implementation:
.home-about-link {
overflow: hidden;
width: 100%;
}
.home-about {
background: url(https://dummyimage.com/600x400/000/fff) no-repeat center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
text-align: center;
height: 300px;
width: 100%;
opacity: 0.8;
}
.home-about:hover {
opacity: 1;
transform: scale(1.1);
-moz-transform: scale(1.1);
-webkit-transform: scale(1.1);
-o-transform: scale(1.1);
-ms-transform: scale(1.1);
/* IE 9 */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=1.1, M12=0, M21=0, M22=1.1, SizingMethod='auto expand')";
/* IE8 */
filter: progid:DXImageTransform.Microsoft.Matrix(M11=1.1, M12=0, M21=0, M22=1.1, SizingMethod='auto expand');
/* IE6 and 7 */
}
h2 {
color: #fff;
}
<div class="home-about-link">
<div class="home-about">
<h2>ABOUT US</h2>
</div>
</div>
Upon hovering over the image, the information (ABOUT US text) also enlarges. My goal is to keep the information font size unchanged while only scaling up the background. Is there a way to achieve this?