CSS Part6 (Qs)
CSS Part6 (Qs)
kuwargautam108@gmail.com
Practice Questions
kuwargautam108@gmail.com
Qs3. Try to complete this code to create a web page loader using CSS animations.
kuwargautam108@gmail.com
HTML Code :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,
initial-scale=1.0" />
<title>CSS</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<h1>Loader</h1>
<div class="loader"></div>
</body>
</html>
kuwargautam108@gmail.com
CSS Code :
.loader {
border: 16px solid #f3f3f3;
border-top: 16px solid goldenrod;
border-radius: 50%;
width: 120px;
height: 120px;
animation: spin 2s linear infinite;
}
@keyframes spin {
0% {
/* Set rotation to 0 degrees */
}
100% {
/* Set rotation to 360 degrees */
}
}