<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS font-weight 属性动画示例- 基础教程(div.cn)</title>
<style>
.animated {
font-size: 32px;
-webkit-animation: test 4s infinite; /* Chrome, Safari, Opera */
animation: test 4s infinite;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes test {
50% {font-weight: bold;}
}
/* Standard syntax */
@keyframes test {
50% {font-weight: bold;}
}
</style>
</head>
<body>
<p> <strong>警告:</strong>:CSS动画在Internet Explorer 9和更早版本中不起作用。</p>
<p> <strong>注意</strong>:下一段的font-weight属性从其初始值“ normal”变为“ bold”,然后再次回到初始值“ normal”,直至无限次。 </p>
<p class="animated">This is an animated paragraph.</p>
</body>
</html>