To implement animation on font property with CSS, you can try to run the following code:
Example
<!DOCTYPE html>
<html>
<head>
<style>
p {
border: 2px solid black;
width: 400px;
height: 100px;
animation: myanim 5s infinite;
}
@keyframes myanim {
70% {
font: 35px arial, sans-serif;
}
}
</style>
</head>
<body>
<p>This is demo text</p>
</body>
</html>