<button>hello</button>
button {
background-color: #4CAF50; /* Green */
opacity: 0.8;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
transition-duration: 0.4s;
}
button:hover {
background-color: #4CAF50; /* Green */
opacity: 1;
color: white;
}
button:focus {
border: 2px solid blue;
}
body.using-mouse :focus {
animation: none;
border: none;
outline: none;
}
document.querySelector('button').addEventListener('click', (e) => {
alert('a');
})
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.