Q:

How to change div background color, when hovering on button which is present in the same div?

I'm trying changing div color when button is hover. code is working if the button is present outside div, but i need button in the same div? 
Code :

.card {
  height: 20em;
  width: 10em;
  border: 1px solid #222;
}

.btn {
  position: absolute;
  bottom: 0;
}

.btn+.card {
  background-color: black;
}
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 card">
  <button class="btn btn-primary">Hover me</button>
</div>

A:

Please Try it following codes.

.card {
  height: 20em;
  width: 10em;
  border: 1px solid #222;
}

.btn {
  position: absolute;
  bottom: 0;
}

.card>div {
  height: 100%;
}

.btn:hover+div {
  background-color: black;
}
<div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 card">
  <button class="btn btn-primary">Hover me</button>
  <div></div>
</div>

