호버시 .space 색상을 변경하려고합니다. 빨간색으로 시작하지만 이미지를 포함하여 전체 영역 위로 마우스를 가져 가면 빨간색 부분이 검은 색으로 변합니다. 그게 가능하니?. 호버로 이동할 때 .space를 변경하십시오.
.space {
background: red;
width:100%;
height:auto;
display:block
}
.space a:hover {
\t background-color: #000;
\t text-decoration: none;
\t -moz-transition: .6s ease-in-out;
\t -webkit-transition: .6s ease-in-out;
\t -o-transition: .6s ease-in-out;
\t -ms-transition: .6s ease-in-out;
\t transition: .6s ease-in-out;
}
.img {
float: right;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<a href="#" class="space">
<img src="https://placeimg.com/100/100/any">
<p>The biggest car</p>
</a>