分享:CSS3用transition实现边框动画效果
来源:互联网 发布:图片归类整理软件 编辑:程序博客网 时间:2024/06/01 13:50
废话不多说,直接上代码:
1:css
code:
- /*** css code ***/
- .animate{transition: all 0.5s ease-in-out;}
- .m{width: 200px;height: 50px;text-align: center;font-size: 20px;line-height: 50px;font-family: Microsoft Yahei; color: gray;border:2px solid #dfdfdf;cursor: pointer;}
- .b{position: relative;}
- .b span{display: inline-block;position: absolute;content: none;border: 0;width: 0;height: 0;}
- .b span.top{right:0;top:0;border-top:2px solid #000;margin-top:-2px;}
- .b:hover span.top{width:198px;}
- .b span.right{right:0;bottom:0;border-right:2px solid #000;margin-right:-2px;}
- .b:hover span.right{height:48px;}
- .b span.bottom{left:0;bottom:0;border-bottom:2px solid #000;margin-bottom:-2px;}
- .b:hover span.bottom{width:198px;}
- .b span.left{left:0;top:0;border-left:2px solid #000;margin-left:-2px;}
- .b:hover span.left{height:48px;}
2:HTML
code:
- <div style="width: 90%;height: 100px;">
- <div class="m b">
- ABOUT US
- <span class="top animate"></span>
- <span class="right animate"></span>
- <span class="bottom animate"></span>
- <span class="left animate"></span>
- </div>
- </div>
阅读全文
1 0
- 分享:CSS3用transition实现边框动画效果
- CSS3用transition实现边框动画效果
- Css3 Transition动画效果
- CSS3 Transition 动画效果
- 详解CSS3 Transition动画效果
- css3动画效果transform transition
- CSS3边框旋转动画实现效果
- 用css3的transition实现过渡动画
- CSS3 transition实现超酷图片墙动画效果
- CSS3 transition实现超酷图片墙动画效果
- Html5的CSS3的transition实现简单动画效果
- 如何使用CSS3的transition实现动画效果?
- CSS3实现过渡效果 (transition)
- 用CSS3实现发光的边框效果
- CSS3 transition transform 动画实现天气预报显示
- CSS3 transition transform 动画实现天气预报显示
- css3 transform transition 实现照片墙效果
- 用js触发CSS3-transition过渡动画
- ArrayDeque源码详解
- python 文本去重 排序
- 分享获得Linux系统RHCE认证日记
- 死链处理的详细步骤
- 关于 axios-mock-adapter 调用流程的分析
- 分享:CSS3用transition实现边框动画效果
- linux下交叉编译libusb的方法及编译一个使用了libusb库的test程序的方法
- Exchange 用户发送邮件提示:您无权执行此操作,解决办法
- 使用POI读取excel文件内容
- FastDFS及Nginx的部署
- curl中对应cookie的管理
- javascript 浏览器永久保存数据:localStorage
- log4j:WARN custom level class not found问题解决方法
- 欢迎使用CSDN-markdown编辑器