I have set a hover effect in my CSS, but it seems to be having no effect. What am I doing wrong?
#place-img-sentosa {
background-image: url(images/sentosa.jpg);
background-size: cover;
}
#place-img-sentosa:hover {
background-color: aliceblue;
}
<div >
<div >
<div id="place-img-sentosa">
</div>
<h4>Take a walk to Sentosa Island</h4>
<h5>With its pristine beaches, exciting attractions and tropical landscapes, the State of Fun is sure to
leave you spellbound.</h5>
</div>
CodePudding user response:
The background image will still be covering the specified background color when hovering. set background image to none when hovering to solve the problem.