在 CSS 字体属性上执行动画

cssweb developmentfront end technology更新于 2024/10/19 6:36:17

要使用 CSS 实现字体属性的动画,您可以尝试运行以下代码:

示例

<!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>

相关文章


有用资源