Ok grazie, ho provato anche modificando ma non riesco. Provo ad inserie tutto il mio codice forse qualche elemento lo sbaglio a mettere.
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Staatliches&display=swap" rel="stylesheet" />
<style media="screen" type="text/css">
#timer {
font-size: 3em;
font-weight: 100;
color: white;
padding: 20px;
width: 100%;
color: white;
}
#timer div {
display: inline-block;
text-align: center;
min-width: 90px;
padding: 15px;
background: #020b43;
border-radius: 10px;
border: 2px solid #030d52;
margin: 15px;
}
#timer div span {
color: #ffffff;
display: block;
margin-top: 15px;
font-size: .35em;
font-weight: 400;
}
.center {
text-align: center;
}
</style>
<div class="center">
<h1 id="headline">Prossimo Evento</h1>
<h2 style="text-align: center;"><span style="color:#2980b9;"><strong>Webinar Bilanci</strong></span></h2>
<div id="timer"> </div>
<div><a class="btn btn-primary shadow p-2 -md rounded-pill" target="_blank" href="#">Visualizza Evento</a></div>
</div>
<script type="text/javascript">
function updateTimer() {
future = Date.parse("jun 06, 2022");
now = new Date();
diff = future - now;
days = Math.floor(diff / (1000 * 60 * 60 * 24));
hours = Math.floor(diff / (1000 * 60 * 60));
d = days;
h = hours - days * 24;
document.getElementById("timer")
.innerHTML =
'<div>' + d + '<span>Giorni</span></div>' +
'<div>' + h + '<span>Ore</span></div>';
if (timer = 0) {
document.getElementById("headline")
.innerHTML = "Evento in corso!";
}
}
setInterval('updateTimer()', 1000);
</script>