So I am trying to make my headers on a website zoom in on hover. I must be doing something wrong. When I hold the mouse over the text the text is zoomed in (or enlarged if you will) but then it snaps back to the original size again.
I want it to snap back to the original size, but only when I remove the mouse from the text. This should be pretty basic but, I guess I am missing something here.
How can I avoid making the text snap back to the original size when the mouse is over the text?
h1, h2, h3, h4, h5, h6 {
clear: both;
font-family: 'Oswald', sans-serif;
font-weight: 400;
line-height: 1.2;
margin-bottom: 3%;
}
h1 {
font-size: 50px; /*Originally 50px*/
}
.entry-title {
font-family: 'Oswald', sans-serif;
font-size: 43px; /*Originally 80px*/
font-weight: 700;
letter-spacing: -1px;
line-height: 1.1;
margin-bottom: 0%;
}
@media (max-width: 768px) {
.entry-title {
font-size: 50px;
margin-bottom: 20px;
}
}
.entry-title a {
font-family: 'Oswald', sans-serif;
color: #404040;
text-decoration: none;
-moz-transition:-moz-transform 0.2s ease-in;
-webkit-transition:-webkit-transform 0.2s ease-in;
-o-transition:-o-transform 0.2s ease-in;
-moz-transition:-moz-transform 0.2s ease-out;
-webkit-transition:-webkit-transform 0.2s ease-out;
-o-transition:-o-transform 0.2s ease-out;
}
.entry-title a:hover {
font-family: 'Oswald', sans-serif;
color: #000000;
text-shadow:1px 0px #555;
-moz-transform:scale(1.03);
-webkit-transform:scale(1.03);
-o-transform:scale(1.03);
}
<h1 class="entry-title">
<a href="http://www.google.com" rel="bookmark">This is a sample text</a>
</h1>