div边框css动画
来源:互联网 发布:暗黑团队毁魔兽 知乎 编辑:程序博客网 时间:2024/05/22 14:01
效果:
css:
.wrap{ width:840px; margin:50px auto; height:300px; } .wrap a{ float:left; width:180px; height:180px; margin:10px; border:2px solid #ddd; position:relative; } .wrap a span{ display:inline-block; position:absolute; background:#4A64B4; transition:.5s; } .wrap a span.top{ left:-2px; top:-2px; width:0; height:2px; } .wrap a span.right{ right:-2px; bottom:0; width:2px; height:0; } .wrap a span.bottom{ bottom:-2px; right:-2px; width:0px; height:2px; } .wrap a span.left{ left:-2px; top:0; width:2px; height:0px; } .wrap a:hover .top, .wrap a:hover .bottom{ width:calc(100% + 2px) } .wrap a:hover .right, .wrap a:hover .left{ height:calc(100% + 2px) }
html:
<div class="wrap"> <a href="#"> <span class="top"></span> <span class="right"></span> <span class="bottom"></span> <span class="left"></span> </a> <a href="#"> <span class="top"></span> <span class="right"></span> <span class="bottom"></span> <span class="left"></span> </a> <a href="#"> <span class="top"></span> <span class="right"></span> <span class="bottom"></span> <span class="left"></span> </a> <a href="#"> <span class="top"></span> <span class="right"></span> <span class="bottom"></span> <span class="left"></span> </a> </div>
阅读全文
0 0
- div边框css动画
- CSS+DIV园角边框
- CSS+DIV园角边框
- CSS+DIV园角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- DIV+CSS圆角边框
- 使用SSH协议连接本地虚拟机的linux系统
- [agc010e]Rearranging
- C语言中函数返回数组;数组与指针的区别
- java之对JDBC的完整封装(兼容多种数据库)
- 解决Bootstrap模态窗口Modal中使用Kindeditor或UEditor编辑器 点击关闭弹窗 出现第二次无法加载的问题
- div边框css动画
- 聊天机器人——智能回复机器人研发
- Android---RecyclerView 刷新与加载更多
- 小程序
- 右值引用与移动构造函数、移动赋值
- #define
- UVA11549 计算机谜题(Floyd判圈算法)
- LwIP BUG之TCP连接丢失
- 获取范围内的随机数