Hi,
I am using the below CSS to on my Wordpress menu bar to show a background when hovered, I want the background to show in the current/selected item as well and I have tried using :active but can't get it working. Any help with this will be appreciated. See code below.
Code:
nav a {
display: inline-block;
padding: .25em 2em;
margin: 1em;
position: relative;
border-radius: .5em;
overflow: hidden;
}
nav a:before {
content: '';
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
z-index: -1;
background: pink;
transform: scaleX(0);
transition: transform .25s;
}
nav a:hover:before, nav .active:before {
transform: scaleX(1);
}
Thanks
Harvey
CodingForums...
ما را در سایت CodingForums دنبال می کنید
برچسب : نویسنده : codingforums بازدید : 157 تاريخ : دوشنبه 29 خرداد 1396 ساعت: 3:33