I've been working on a small project and I added a button with hover and CSS effects.
However, the issue is that once the button is clicked, it reverts back to its basic state without any of the CSS properties applied.
I attempted to troubleshoot if JavaScript was causing this behavior, but unfortunately, I couldn't pinpoint the exact reason behind it.
Here's the HTML code for the button:
<button class="btn6">1 MB</button>
CSS Styles for the Button:
.btn6, .btn6:link, .btn6:visited {
padding: 15px;
border: 3px solid #333;
color: #333;
font-weight: 700;
text-transform: uppercase;
font-size: 13px;
letter-spacing: 3px;
transition: all .2s ease-in-out;
}
.btn6:hover, .btn6:link:hover, .btn6:visited:hover {
background: #333;
border: 3px solid #333;
color: #fefefe;
border-radius: 50px;
}
For those interested in reviewing the JavaScript code, you can access it via this CodePen link ( https://codepen.io/imgkl/pen/XwNyKZ )
The desired outcome is for the button to maintain its CSS properties even after being clicked.