css 动画效果
来源:互联网 发布:配送软件 编辑:程序博客网 时间:2024/05/18 02:57
效果如上图。
html代码:
<a href="javascript:;" class="a a-hover">hover</a><a href="javascript:;" class="a a-hover2"> hover</a><a href="javascript:;" class="a a-hover3"> hover</a>
css代码:
* { box-sizing: inherit; -webkit-transition-property: all; transition-property: all; -webkit-transition-duration: .6s; transition-duration: .6s; -webkit-transition-timing-function: ease; transition-timing-function: ease;}body{ background: palevioletred;}.a{ color: white; font-size: 14px; height: 40px; display: block; width: 150px; line-height: 40px; text-align: center; text-decoration: none; text-transform: uppercase; margin: 0 auto; margin-top: 20px;}.a-hover:hover , .a-hover:active{ letter-spacing: 5px;}.a-hover:before ,.a-hover:after{ border: 1px solid rgba(255,255,255,0); content: ""; display: block; width: 0; transition: all 280ms ease-in-out; margin: 0 auto;}.a-hover:hover:after , .a-hover:hover:before{ border-color: #fff; -webkit-transition: width 350ms ease-in-out; width: 70%;}.a-hover2{ position: relative; border: 1px solid white; overflow: hidden;}.a-hover2:after{ background: #fff; content: " "; height: 155px; display: block; position: absolute; top: -70px; width: 50px; z-index: 10; opacity: .2; left: -105px; transform: rotate(45deg); z-index: -10; transition: all 550ms ease-in-out;}.a-hover2:hover:after{ left: 200px; transition: all 550ms ease-in-out;}.a-hover3{ outline: 1px solid rgba(255,255,255,0.5); text-shadow: none; border: 0px;}.a-hover3:hover{ border: 1px solid white; box-shadow:inset 0 0 20px rgba(255,255,255,0.5) , 0 0 20px rgba(0,0,0,.2); outline: 1px solid rgba(255,255,255,0); outline-offset: 15px; text-shadow: 1px 1px 2px #427388;}
阅读全文
0 0
- css 动画效果 -- transition
- CSS-动画效果
- css动画效果
- css动画效果
- css 动画效果1
- css样式-动画效果
- CSS动画效果
- css动画效果
- 浅谈CSS动画效果
- css实现动画效果
- css动画效果
- css动画效果
- css 动画效果
- CSS各种动画效果
- css弹性动画效果
- CSS动画效果入门
- CSS动画效果
- 动画效果css导航栏
- 差分约束/并查集——BZOJ1202/Luogu2294 [HNOI2005]狡猾的商人
- Java实现全排列
- 基于CMMI软件工程的问题解答
- N 皇后问题 回溯/深搜
- windows10 python2.7 opencv3
- css 动画效果
- Redis命令总结
- python基础学习之——使用list和tuple
- 工程中编写自己的Makefile---1 一些基本概念
- 分布式相关文章收集(转)
- Java EE之Servlet、JSP学习
- css3提示文字弹窗代码
- 安装VirtualBox的时候遇到的问题
- Java实现矩形覆盖