I need to make a dice start/stop rolling on the click of a button but I cannot use any JavaScript. Right now it just runs infinitely. CSS/HTML only, thank you.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.dice { /* HTML symbols */
font-size: 100px;
font-weight: 800;
}
.dice::after {
content:'';
animation: rolling 6s linear infinite;
}
@keyframes rolling {
0% {content:'\2680';}
20% {content:'\2681';}
40% {content:'\2682';}
60% {content:'\2683';}
80% {content:'\2684';}
100% {content:'\2685';}
}
</style>
</head>
<body>
<span class="dice"></span>
</body>
</html>