html悬浮返回键代码,CSS3一款返回按钮悬停动画

CSS

语言:

CSSSCSS

确定

body,

html {

height: 100%;

}

body {

display: flex;

align-items: center;

justify-content: center;

background-color: #F5F4FA;

font-family: 'Roboto', sans-serif;

}

.back {

position: relative;

display: inline-block;

text-decoration: none;

padding: 10px 10px 10px 40px;

}

.back h4 {

color: #4A4F6A;

font-size 16px;

transform: translateY(8px);

transition: transform 500ms 0s cubic-bezier(0.2, 0, 0, 1);

}

.back span {

opacity: 0;

color: #858BA9;

font-size: 12px;

font-weight: 300;

display: inline-block;

transform: translateY(10px);

transition: transform 500ms 0s cubic-bezier(0.2, 0, 0, 1), opacity 500ms 0s cubic-bezier(0.2, 0, 0, 1)

}

.back div {

top: 11px;

left: 0;

content: '';

width: 30px;

height: 30px;

display: block;

overflow: hidden;

position: absolute;

border-radius: 50%;

transform: scale(1);

background-color: #E9E7F2;

transition: transform 400ms 0s cubic-bezier(0.2, 0, 0, 1.6);

}

.back div::after {

top: 0;

left: 0;

content: '';

width: 60px;

height: 30px;

position: absolute;

background-position: 0 0;

background-image: url('https://s3-eu-west-1.amazonaws.com/thomascullen-codepen/back.svg');

transition: transform 400ms 0s cubic-bezier(0.2, 0, 0, 1);

}

.back:hover h4 {

color: #171922;

}

.back:hover h4,

.back:hover span {

opacity: 1;

transform: translateY(0);

}

.back:hover div {

transform: scale(1.1);

background-color: white;

box-shadow: 0 2px 10px 0 rgba(185, 182, 198, 0.00), 0 1px 3px 0 rgba(175, 172, 189, 0.25);

}

.back:hover div::after {

transform: translateX(-30px);

}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值