搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
HTML/CSS
CSS 参考手册
CSS 参考手册
源代码
清空
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS vertical-align 对齐属性动画示例- 基础教程(div.cn)</title> <style> .animated { vertical-align: bottom; -webkit-animation: test 4s infinite; /* Chrome, Safari, Opera */ animation: test 4s infinite; } /* Chrome, Safari, Opera */ @-webkit-keyframes test { 50% {vertical-align: top;} } /* Standard syntax */ @keyframes test { 50% {vertical-align: top;} } </style> </head> <body> <p> <strong>警告:</strong>:CSS动画在Internet Explorer 9和更早版本中不起作用。</p> <p> <strong>注意</strong>:以下标记图像的垂直对齐方式是从其初始值“ bottom”到“ top”,然后再次回到初始值“ bottom”,直到无穷多次。< p> <h1><img src="/run/images/marker-left.gif" alt="Marker Left" class="animated"> CSS vertical-align Animation <img src="/run/images/marker-right.gif" alt="Marker Right" class="animated"></h1> </body> </html>
运行结果