I'm attempting to change the text color to white upon hovering, but I haven't had any success so far.
Here's the code snippet that I've used. How can I ensure that the text color changes to white and also its size increases when hovered over?
This is the code snippet I experimented with:
h1::before,
h1::after {
content: "";
width: 0%;
position: absolute;
height: 2px;
background: white;
transition: width .3s ease;
}
h1:hover::before,
h1:hover::after {
width: 100%;
}
h1::before {
top: 0;
left: 0;
}
h1::after {
top: 100%;
right: 0;
}
<body>
<div class="text-wrapper">
<h1 id='text'>
Days are gone </h1>
</div>
</body>