I want to change my <p>
tag's color to white while hover on the class "cards". Here is my code of .js file
<div className='p-3 cards' >
<div className='d-flex justify-content-around align-items-center'>
<div>
<img style={{ height: '70px' }} src={blog.image} alt="" />
</div>
<div>
<h5>{blog.name}</h5>
<p >{blog.date}</p>
</div>
</div>
<div >
<h4 className='p-3'>{blog.title}</h4>
<p >{blog.description}</p>
</div>
</div>
Here is the code of my .css file
.cards{
border: 1px solid lightgray;
border-radius: .3em;
}
.cards p{
color: slategray;
}
.cards:hover {
background-image:linear-gradient(45deg, #1cc7c1, rgb(105, 173, 175)) ;
color: whitesmoke;
}
Here is the output of before hover (https://i.ibb.co/RT9tzVZ/d.jpg)
And here is the output after hover (https://i.ibb.co/hgqDtzz/d1.jpg)