@danielbrah
Posted
For the hover state, I would change the following code:
.card__img:hover::before {
display: block;
}
to this:
.card__img:hover::before {
opacity: 0.4;
}
Under the .card__img::before
selector, change the following properties:
opacity: 0.4;
to opacity: 0;
, and display: none;
to display: block
Then you can add your transition for the opacity property! The transition does not work for the display property. The display property was basically swapped for the opacity property in the hover state for .card__img::before
.
Marked as helpful
@Jairth
Posted
@danielbrah Thank you very much!! I did not know that detail of the transition. I also have a problem with the transition for my h1 and my strong. Is it also due to some other property?
@danielbrah
Posted
@Jairth Did you fix the problem already? It seems that the transitions on both the h1 and strong element is working just fine.
@Jairth
Posted
@danielbrah The transition is shown on my cell phone but not on my PC hahaha I don't understand