搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
HTML/CSS
CSS 参考手册
CSS 属性大全
源代码
清空
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS3 transition属性示例- 基础教程(div.cn)</title> <style> button { font-size: 16px; font-weight: bold; padding: 10px 20px; background: #fd7c2a; border: 3px solid #dc5801; -webkit-transition-property: background 2s, border 2s; /* For Safari 3.0+ */ transition: background 2s, border 2s; /* Standard syntax */ } button:hover { background: #3cc16e; border-color: #257644; } </style> </head> <body> <button type="button">鼠标移到这里</button> </body> </html>
运行结果