html文字爬楼效果代码,css

css

@import url("https://fonts.googleapis.com/css2?family=Lemonada:wght@700&display=swap");

*, *::before, *::after {

padding: 0;

margin: 0 auto;

box-sizing: border-box;

}

body {

background-color: #1f1f1f;

color: #444;

min-height: 100vh;

display: -webkit-box;

display: flex;

-webkit-box-pack: center;

justify-content: center;

-webkit-box-align: center;

align-items: center;

}

.continer {

position: relative;

min-width: 720px;

height: 360px;

border: 2px solid #fff;

border-radius: 4px;

-webkit-perspective: 800px;

perspective: 800px;

-webkit-perspective-origin: 150% -150%;

perspective-origin: 150% -150%;

overflow: hidden;

background-image: linear-gradient(190deg, #def, #9ab 53%, #789 53%, #456);

}

.step {

position: absolute;

overflow: hidden;

border: solid #aaa;

border-width: 1px 0;

}

.stepA, .stepC, .stepE, .stepG {

width: 80px;

height: 120px;

background-color: #fff;

-webkit-transform: rotateX(90deg);

transform: rotateX(90deg);

}

.stepA::after, .stepC::after, .stepE::after, .stepG::after {

color: #4b8;

}

.stepB, .stepD, .stepF {

width: 40px;

height: 120px;

background-color: #bcd;

-webkit-transform: rotateX(90deg) rotateY(90deg);

transform: rotateX(90deg) rotateY(90deg);

}

.stepB::after, .stepD::after, .stepF::after {

color: #264;

}

.step::after {

content: 'Climbing up the stairs';

position: absolute;

left: 400px;

font-family: 'Lemonada', cursive;

font-weight: bold;

font-size: 60px;

-webkit-filter: blur(1px);

filter: blur(1px);

white-space: nowrap;

-webkit-animation: textClimb 12s infinite linear;

animation: textClimb 12s infinite linear;

}

.stepA {

width: 320px;

top: 200px;

left: 460px;

}

.stepB {

top: 180px;

left: 440px;

}

.stepB::after {

-webkit-animation-delay: 0.4s;

animation-delay: 0.4s;

}

.stepC {

top: 160px;

left: 380px;

}

.stepC::after {

-webkit-animation-delay: 1.2s;

animation-delay: 1.2s;

}

.stepD {

top: 140px;

left: 360px;

}

.stepD::after {

-webkit-animation-delay: 1.6s;

animation-delay: 1.6s;

}

.stepE {

top: 120px;

left: 300px;

}

.stepE::after {

-webkit-animation-delay: 2.4s;

animation-delay: 2.4s;

}

.stepF {

top: 100px;

left: 280px;

}

.stepF::after {

-webkit-animation-delay: 2.8s;

animation-delay: 2.8s;

}

.stepG {

width: 400px;

top: 80px;

left: -100px;

}

.stepG::after {

-webkit-animation-delay: 6.8s;

animation-delay: 6.8s;

}

@-webkit-keyframes textClimb {

from {

left: 400px;

}

to {

left: -800px;

}

}

@keyframes textClimb {

from {

left: 400px;

}

to {

left: -800px;

}

}

.twitterLink {

position: fixed;

bottom: 0.5em;

right: 0.5em;

}

.twitterLink img {

width: 2em;

-webkit-filter: grayscale(100%);

filter: grayscale(100%);

-webkit-transition: -webkit-filter 0.25s;

transition: -webkit-filter 0.25s;

transition: filter 0.25s;

transition: filter 0.25s, -webkit-filter 0.25s;

}

.twitterLink img:hover {

-webkit-filter: grayscale(0%);

filter: grayscale(0%);

}

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值