CSS Practical 9
CSS Practical 9
PROGRAM:
<!DOCTYPE html>
<html>
<head>
<title>Experiment 9</title>
<style>
body
{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
#colorButton
{
top: 50%;
transform: translateY(-50%);
background: rgba(0, 0, 0, 0.5);
color: white;
border: none;
padding: 10px 20px;
cursor: pointer; border-radius: 5px;
font-size: 18px;
font-family: Times New Roman;
}
</style>
</head>
<body>
colorButton.addEventListener("click", changeBackgroundColor);
setInterval(changeBackgroundColor, 2000);
</script>
</body>
</html>
OUTPUT: