Changing Background Color

Changing Background Color code:

1.index.html:

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Changing Background Color</title> <link rel="stylesheet" href="style.css"> </head> <body> <h1>Changing Background Color</h1> </body> </html>

2.style.css:

body { margin: 0; padding: 0; animation: bgcolor infinite 15s; } h1 { margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 4em; color: #fff; position: absolute; top: 50%; left: 50%; transform: translate(-50% , -50%); text-align: center; text-transform: uppercase; } @keyframes bgcolor{ 0% { background: #f6e58d; } 20% { background: #f0932b; } 40% { background: #686de0; } 60% { background: #130f40; } 80% { background: #535c68; } 100% { background: #f6e58d; } }

Оставьте комментарий

Ваш адрес email не будет опубликован.