hexo-theme-ayer/source-src/css/_partial/totop.styl

38 lines
582 B
Stylus
Raw Normal View History

2019-12-03 11:37:44 +00:00
@keyframes rocket {
0% {
transform translateY(0)
opacity 1;
}
45% {
transform translateY(-3.2rem)
opacity 0;
}
55% {
transform translateY(3.2rem)
opacity 0;
}
100% {
transform translateY(0)
opacity 1;
}
}
2020-03-23 15:04:50 +00:00
.totop,.todark
2019-12-03 11:37:44 +00:00
position relative
2020-03-23 15:04:50 +00:00
display block
2019-12-03 11:37:44 +00:00
overflow hidden
cursor pointer
rounded-circle(3.2rem)
2020-03-23 15:04:50 +00:00
background-color darken(froth-light,2%)
2019-12-03 11:37:44 +00:00
line-height 3rem
2020-03-23 15:04:50 +00:00
opacity .6
transition(opacity 1s ease)
&:hover
opacity 1
.totop
margin-bottom .8rem
2019-12-03 11:37:44 +00:00
&:hover > i {
animation rocket .3s ease-in-out
2020-03-23 15:04:50 +00:00
}