Sul sito http://www.istitutostoriaecclesiasti...net/index.html ho un bottone sul banner dei cookie e vorrei che cambiasse colore quando passo sopra il mouse.
codice:
<button id="acceptCookie">OK</button>
codice:
document.getElementById("acceptCookie").addEventListener("click", () => { ...
codice:
#cookiePopup button {
background-color: #6859fe;
border: none;
color: #ffffff;
font-size: 1.2em;
padding: 0.5em 0.7em;
display: block;
position: relative;
margin: auto;
border-radius: 5px;
cursor:pointer;
}
Ho provato a mettere una classe tipo:
codice:
.button:hover {
background-color: #bb58fe;}
<button id="acceptCookie" class="button">OK</button>
ma non funziona.
Dove sbaglio?
Ciao e grazie