搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
HTML/CSS
CSS 参考手册
CSS 参考手册
源代码
清空
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS min-height 属性动画示例- 基础教程(div.cn)</title> <style> .animated { width: 150px; height: 60px; padding: 40px 0; font: bold 46px sans-serif; text-align: center; background: #aaccaa; border: 1px solid #63a063; -webkit-animation: test 4s infinite; /* Chrome, Safari, Opera */ animation: test 4s infinite; } /* Chrome, Safari, Opera */ @-webkit-keyframes test { 50% {min-height: 500px;} } /* Standard syntax */ @keyframes test { 50% {min-height: 500px;} } </style> </head> <body> <p> <strong>警告:</strong>:CSS动画在Internet Explorer 9和更早版本中不起作用。</p> <p> <strong>注意</strong>:以下DIV框的min-height属性将从其初始值“ none”动画化为“ 500px”,然后再次回到初始值</p> <div class="animated">Box</div> </body> </html>
运行结果