首页 > web前端 > html教程 > CSS learnning._html/css_WEB-ITnose

CSS learnning._html/css_WEB-ITnose

WBOY
发布: 2016-06-24 11:23:37
原创
1009 人浏览过

"Whenever this property changes, apply that change slowly."

The property transition: width 2s says “when the width changes, animate it over the course of 2 seconds.”

transition: all 0.5s says “when anything changes, spend 0.5s doing it.”

So if you want to round the corners of a button when it’s hovered?

/* Initial state: border-radius is 0. * When border-radius changes, it'll take 0.3s * instead of happening immediately */button {	border-radius: 0;	transition: border-radius 0.3s;	/* any other styles you need ... */}button:hover {	border-radius: 20px;}
登录后复制

  Here’s the button:

1 .demo-button { transition: border-radius 0.3s; 2 border: 1px solid dodgerblue; background-color: #fff; 3 border-radius: 0; padding: 1em; color: dodgerblue; } 4 .demo-button:hover { border-radius: 20px; }
登录后复制

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板