CssSY CssSY - 1 year ago 94
HTML Question

Change background color and background image

I want to change my div background color and image on hover. Just like this.

enter image description here

I tried with this way. But it changed only background color. Is there any way to achieve this kind of situation?

<div class="col-md-4">
<div class="icon-wrapper"></div>

.icon-wrapper {
background: url("/assets/human-resources.png");
display: inline-block;
background-position: center;
background-repeat: no-repeat;
border: 1px solid #ddd;
height: 120px;
position: relative;
width: 120px;
border-radius: 50%;
transition: all 0.2s;

img {
top: 22%;
left: 24%;
position: absolute;

&:hover {
background: blue;
background-position: center;
background-repeat: no-repeat;
background: url("/assets/car-white.png");

Answer Source
background-color: #6DB3F2;
background-image: url('images/checked.png');

you could try to use this instead

background: #6DB3F2 url('images/checked.png');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download