css数字发光,CSS字体发光效果

HTML

vue.js

vue.js

vue.js

vue.js

vue.js

vue.js

vue.js

vue.js

vue.js

vue.js

vue.js

CSS

h1 {

animation:glow 10s ease-in-out infinite;

/* For less laggy effect, uncomment this:

animation:none;

-webkit-text-stroke:1px #fff;

=========== */

}

* { box-sizing:border-box; }

body {

background:#0a0a0a;

overflow:hidden;

text-align:center;

}

figure {

animation:wobble 5s ease-in-out infinite;

transform-origin:center center;

transform-style:preserve-3d;

}

@keyframes wobble {

0%,100%{ transform:rotate3d(1,1,0,40deg); }

25%{ transform:rotate3d(-1,1,0,40deg); }

50%{ transform:rotate3d(-1,-1,0,40deg); }

75%{ transform:rotate3d(1,-1,0,40deg); }

}

h1 {

display:block;

width:100%;

padding:40px;

line-height:1.5;

font:900 8em 'Concert One', sans-serif;

text-transform:uppercase;

position:absolute;

color:#0a0a0a;

}

@keyframes glow {

0%,100%{ text-shadow:0 0 30px red; }

25%{ text-shadow:0 0 30px orange; }

50%{ text-shadow:0 0 30px forestgreen; }

75%{ text-shadow:0 0 30px cyan; }

}

h1:nth-child(2){ transform:translateZ(5px); }

h1:nth-child(3){ transform:translateZ(10px);}

h1:nth-child(4){ transform:translateZ(15px); }

h1:nth-child(5){ transform:translateZ(20px); }

h1:nth-child(6){ transform:translateZ(25px); }

h1:nth-child(7){ transform:translateZ(30px); }

h1:nth-child(8){ transform:translateZ(35px); }

h1:nth-child(9){ transform:translateZ(40px); }

h1:nth-child(10){ transform:translateZ(45px); }

效果

aa686523b2d020863dd0017265a7ccd2.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值