Reputation:
I want to create a gradient in the end of the of the link like this:
The gradient should disappear when hovering over it.
My HTML code (jsfiddle):
<a href="#">https://<span class="txt">in Phrase Overview</span></a>
CSS code
.txt {
padding: 12px 16px;
color:blue;
top:0;
-webkit-box-shadow: -10px 0 10px -2px #ffffff;
box-shadow: -10px 0 10px -2px #ffffff;
}
span:hover {
-webkit-box-shadow: none;
box-shadow: none;
}
But when I hover it, the gradient doesn't disappear:
please, help me to check this problem.
Upvotes: 0
Views: 28
Reputation: 66
Change your style to this:
.txt{
padding: 12px 16px;
color:blue;
top:0;
-webkit-box-shadow: -10px 0 10px -2px #ffffff;
box-shadow: -10px 0 10px -2px #ffffff;
}
a:hover span.txt{
-webkit-box-shadow: none;
box-shadow: none;
}
Upvotes: 1