搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
HTML/CSS
CSS 参考手册
CSS 参考手册
源代码
清空
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS font 属性动画示例- 基础教程(div.cn)</title> <style> .animated { -webkit-animation: test 4s infinite; /* Chrome, Safari, Opera */ animation: test 4s infinite; } /* Chrome, Safari, Opera */ @-webkit-keyframes test { 50% {font: 42px bold;} } /* Standard syntax */ @keyframes test { 50% {font: 42px bold;} } </style> </head> <body> <p> <strong>警告:</strong>:CSS动画在Internet Explorer 9和更早版本中不起作用。</p> <p> <strong>注意:</strong>在所有单个字体属性中,只有CSS可以设置字体大小,字体粗细,字体拉伸和行高属性。 有关详细信息,请参见CSS <a href="https://www.div.cn/css-reference/css-font-property.html" target="_top"> font </a>速记属性。</p> <p class="animated">这是一段动画。</p> </body> </html>
运行结果