拐道交叉的css3动画,3个CSS3按钮悬停交叉环绕边线动画

CSS

语言:

CSSSCSS

确定

@import url("https://fonts.googleapis.com/css?family=Raleway");

* {

box-sizing: border-box;

}

body {

margin: 0;

padding: 0;

width: 100%;

height: 100vh;

display: flex;

justify-content: center;

align-items: center;

flex-direction: column;

font-family: Raleway;

background-color: #ecf0f1;

}

.copyright {

position: absolute;

bottom: 0;

}

.copyright a {

text-decoration: none;

color: #16a085;

}

.copyright a:hover {

text-decoration: underline;

}

.button {

position: relative;

padding: 1em 1.5em;

border: none;

background-color: transparent;

cursor: pointer;

outline: none;

font-size: 18px;

margin: 1em 0.8em;

}

.button.type1 {

color: #566473;

}

.button.type1.type1::after,

.button.type1.type1::before {

content: "";

display: block;

position: absolute;

width: 20%;

height: 20%;

border: 2px solid;

transition: all 0.6s ease;

border-radius: 2px;

}

.button.type1.type1::after {

bottom: 0;

right: 0;

border-top-color: transparent;

border-left-color: transparent;

border-bottom-color: #566473;

border-right-color: #566473;

}

.button.type1.type1::before {

top: 0;

left: 0;

border-bottom-color: transparent;

border-right-color: transparent;

border-top-color: #566473;

border-left-color: #566473;

}

.button.type1.type1:hover:after,

.button.type1.type1:hover:before {

width: 100%;

height: 100%;

}

.button.type2 {

color: #16a085;

}

.button.type2.type2:after,

.button.type2.type2:before {

content: "";

display: block;

position: absolute;

top: 100%;

left: 0;

width: 100%;

height: 2px;

background-color: #16a085;

transition: all 0.3s ease;

transform: scale(0.85);

}

.button.type2.type2:hover:before {

top: 0;

transform: scale(1);

}

.button.type2.type2:hover:after {

transform: scale(1);

}

.button.type3 {

color: #435a6b;

}

.button.type3.type3::after,

.button.type3.type3::before {

content: "";

display: block;

position: absolute;

width: 20%;

height: 20%;

border: 2px solid;

transition: all 0.6s ease;

border-radius: 2px;

}

.button.type3.type3::after {

bottom: 0;

right: 0;

border-top-color: transparent;

border-left-color: transparent;

border-bottom-color: #435a6b;

border-right-color: #435a6b;

}

.button.type3.type3::before {

top: 0;

left: 0;

border-bottom-color: transparent;

border-right-color: transparent;

border-top-color: #435a6b;

border-left-color: #435a6b;

}

.button.type3.type3:hover:after,

.button.type3.type3:hover:before {

border-bottom-color: #435a6b;

border-right-color: #435a6b;

border-top-color: #435a6b;

border-left-color: #435a6b;

width: 100%;

height: 100%;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值