Hover on selector :before

Asked

Viewed 1,406 times

5

I found myself in a situation, I even know how to get around, doing otherwise, but I wonder if it is possible to use :Hover in an element :before, I have the following structure:

<a href="" class="call-box call-info-city block">
  Informações da cidade
</a>
<a href="" class="call-box call-benefits block">
  Benefícios Fiscais
</a>

Where, the element call box, has an :before selector, as follows:

.call-box {
    float: left;
    font-family: 'LatoBold', arial, sans-serif;
    color: #909090;
    height: 52px;
    width: 150px;
    padding: 10px 0 0 62px;
    line-height: 16px;
    position: relative;
}
.call-box:before {
    position: absolute;
    content: '';
    left: 0;
    top: 0;
    border: 2px solid #00BF8B;
    height: 50px;
    width: 50px;
    -webkit-border-radius: 50%;
       -moz-border-radius: 50%;
            border-radius: 50%;
}

In the call-box element Hover, I would like to modify the :before selector, it is possible?

2 answers

7

Pfss, solved.

.call-box:hover:before {
  background-color: #00BF8B;
}

3

Browser other questions tagged

You are not signed in. Login or sign up in order to post.