Relógio Digital
function updateClock() {
const now = new Date();
const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
const timeString = `${hours}:${minutes}:${seconds}`;
document.getElementById('clock').textContent = timeString;
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
const dateString = now.toLocaleDateString('pt-BR', options);
document.getElementById('date').textContent = dateString;
}
setInterval(updateClock, 1000);
updateClock();
body {
margin: 0;
overflow: hidden;
font-family: 'Arial', sans-serif;
}
#video-background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
overflow: hidden;
}
#background-video {
width: 100%;
height: 100%;
object-fit: cover;
}
#content {
position: absolute;
top: 60%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #fff;
background-color: rgba(0, 0, 0, 0.5);
padding: 20px;
border-radius: 10px;
}
#location {
font-size: 2em;
margin-bottom: 10px;
}
#clock {
font-size: 6em;
margin-bottom: 10px;
}
#date {
font-size: 1.5em;
}