帮助中心
获取牛币
联系我们
关于我们
版权声明
素材牛首页
微博登录
QQ登录
微信扫码登录
注册
登录
新浪微博
QQ登陆
微信登录
热门搜索:
小程序
支付
Java
后台模板
上传
商城模板
jQuery
手机
Thinkphp
微信
Vue.js
首 页
网页特效
整站源码
PHP实例
网站模版
工具箱
常用代码
论坛
游戏源码
资源分享
当前位置:
首页
»
精选常用代码
» 纯CSS实现边框效果
纯CSS实现边框效果
浏览:653次
-
评论:0次
-
发布时间:2018-09-01
Html
Css
Js
.box { width:100px; height:100px; border:1px solid #eee; position:relative; margin:50px auto; background-color:rgb(173,151,173); } .box1 { width:100px; height:100px; border:1px solid #eee; position:relative; margin:50px auto; background-color:rgb(100,112,106); } .box2 { width:100px; height:100px; border:1px solid #eee; position:relative; margin:50px auto; background-color:rgb(208,215,233); } .left-to-right-border { position:absolute; width:0; height:1px; background-color:rgba(98,194,60,0.8); top:0; left:0; bottom:0; transition:0.5s; -webkit-transition:0.5s; -moz-transition:0.5s; -ms-transition:0.5s; -o-transition:0.5s; -webkit-box-shadow:0px -3px 5px rgb(81,221,25); box-shadow:0px -3px 5px rgb(70,219,11); } .right-to-bottom-border { position:absolute; width:1px; height:0px; background-color:rgba(98,194,60,0.8); top:0; right:0; transition:0.5s; -webkit-transition:0.5s; -moz-transition:0.5s; -ms-transition:0.5s; -o-transition:0.5s; -webkit-box-shadow:3px 0px 5px rgb(81,248,15); box-shadow:3px 0px 5px rgb(71,233,8); } .bottom-to-left-border { position:absolute; width:0px; height:1px; background-color:rgba(98,194,60,0.8); bottom:0; right:0; transition:0.5s; -webkit-transition:0.5s; -moz-transition:0.5s; -ms-transition:0.5s; -o-transition:0.5s; -webkit-box-shadow:0px 3px 5px rgb(80,245,14); box-shadow:0px 3px 5px rgb(73,226,12); } .bottom-to-start-border { position:absolute; width:1px; height:0px; background-color:rgba(98,194,60,0.8); bottom:0; left:0; transition:0.5s; -webkit-transition:0.5s; -moz-transition:0.5s; -ms-transition:0.5s; -o-transition:0.5s; -webkit-box-shadow:-3px 0px 5px rgb(78,241,13); box-shadow:-3px 0px 5px rgb(74,240,8); } .box:hover .left-to-right-border { width:100%; transition:0.5s; -webkit-transition:0.5s; -moz-transition:0.5s; -ms-transition:0.5s; -o-transition:0.5s; } .box:hover .right-to-bottom-border { height:100%; transition:0.5s; -webkit-transition:0.5s; -moz-transition:0.5s; -ms-transition:0.5s; -o-transition:0.5s; } .box:hover .bottom-to-left-border { width:100%; transition:0.5s; -webkit-transition:0.5s; -moz-transition:0.5s; -ms-transition:0.5s; -o-transition:0.5s; } .box:hover .bottom-to-start-border { height:100%; transition:0.5s; -webkit-transition:0.5s; -moz-transition:0.5s; -ms-transition:0.5s; -o-transition:0.5s; } /* 强大的分割线 */ .box2:hover .left-to-right-border { width:100%; -webkit-transition-duration:0.2s; transition-duration:0.2s; -webkit-transition-timing-function:linear; transition-timing-function:linear; -webkit-transition-delay:0s; transition-delay:0s; } .box2:hover .right-to-bottom-border { height:100%; -webkit-transition-duration:0.2s; transition-duration:0.2s; -webkit-transition-timing-function:linear; transition-timing-function:linear; -webkit-transition-delay:0.2s; transition-delay:0.2s; } .box2:hover .bottom-to-left-border { width:100%; -webkit-transition-duration:0.2s; transition-duration:0.2s; -webkit-transition-timing-function:linear; transition-timing-function:linear; -webkit-transition-delay:0.4s; transition-delay:0.4s; } .box2:hover .bottom-to-start-border { height:100%; -webkit-transition-duration:0.2s; transition-duration:0.2s; -webkit-transition-timing-function:linear; transition-timing-function:linear; -webkit-transition-delay:0.6s; transition-delay:0.6s; }
↑上面代码改变,会自动显示代码结果
jQuery调用版本:
2.1.4
<!doctype html><html><head><meta charset="utf-8"><title>纯CSS实现边框效果-www.sucainiu.com</title><script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script><style>
</style></head><body>
<script>
</script>
</body></html>
立即下载
收藏
积分说明:注册即送10牛币,每日签到可获得5牛币,成为VIP会员可永久免牛币下载!
充值积分
充值会员
更多说明»
代码描述:纯css实现的边框效果
JS正则验证字符限制
CSS鼠标悬停效果
讨论这个常用代码(0)
回答他人问题或分享心得会奖励牛币
〒_〒 居然一个评论都没有……
文明上网,理性发言! 😉 阿里云幸运券,
戳我领取
发表评论
提交回复
我的积分余额:
0
已下载次数:
653
所需牛币:
5
开始下载
牛币获取:
签到、评论、充值
» 在线充值
(10牛币=1元)
成为VIP可永久免积分下载全部常用代码
» 查看详情
VIP
客服
签到
充值