I'm looking to customize the hover color of my links to match the constantly changing background. You can view my progress on this in the JSFiddle linked below: https://jsfiddle.net/Lcz7gk72/
Essentially, I want the "[email protected]" text to blend with the body background when hovered over.
Any assistance would be greatly appreciated. While I prefer to stick to just JavaScript, if absolutely necessary, jQuery could be considered.
body {
font: 20px monospace;
color: #fff;
-webkit-font-smoothing: antialiased;
animation: pulse 60s infinite normal;
-webkit-animation: pulse 60s infinite normal;
-moz-animation: pulse 60s infinite normal;
-o-animation: pulse 60s infinite normal;
}
a {
color: #fff;
border-bottom: 1px dotted #fff;
text-decoration: none;
}
a:hover {
border-bottom: 1px solid #fff;
position: relative;
}
a:after {
display: block;
position: absolute;
left: 0;
bottom: 0px;
width: 0;
height: 20px;
background-color: #fff;
content: "";
transition: width 0.4s;
}
a:hover {
color: #fff;
}
a:hover:after {
width: 100%;
}
@keyframes pulse {
0% { background-color: #f00; }
25% { background-color: #0f0; }
50% { background-color: #00f; }
75% { background-color: #00a; }
100% { background-color: #0a0; }
}
@-webkit-keyframes pulse {
0% { background-color: #f00; }
25% { background-color: #0f0; }
50% { background-color: #00f; }
75% { background-color: #00a; }
100% { background-color: #0a0; }
}
@-moz-keyframes pulse {
0% { background-color: #f00; }
25% { background-color: #0f0; }
50% { background-color: #00f; }
75% { background-color: #00a; }
100% { background-color: #0a0; }
}
@-o-keyframes pulse {
0% { background-color: #f00; }
25% { background-color: #0f0; }
50% { background-color: #00f; }
75% { background-color: #00a; }
100% { background-color: #0a0; }
}
<a href="mailto:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1c68796f685c68796f68327f7371">[email protected]</a>"><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="84f0e1f7f0c4f0e1f7f0aae7ebe9">[email protected]</a></a>