Thursday, 12 September 2013

Is it possible to have a :after pseudo element on a button?

Is it possible to have a :after pseudo element on a button?

I have a button and on a hover i want a after element to show. But i can't
see it. Is it impossible to have a :after element on a button?
html:
<button class="button button-primary">My button</button>
css/sass:
.button { cursor:pointer; height:30px;}
.button-primary {
color:$regular-text-light;
background-color: $dark-blue;
border:none;
&:hover:after {
display: block;
position:relative;
top: 3px;
right:3px;
width:100px;
height:5px;
background-color: $dark-blue;
}

No comments:

Post a Comment