html字体外颜色轮廓,HTML5 文本特效 - 轮廓提取

CSS

语言:

CSSSCSS

确定

body {

background: #eaeaea;

}

#effect h1 {

color: #222;

text-align: center;

padding-top: 10%;

font-size: 100px;

font-family: "Modern Grotesk";

font-weight: bold;

position: relative;

}

#effect h1 p {

display: inline-block;

position: relative;

width: 100px;

height: 100px;

line-height: 100px;

}

#effect h1 p span {

position: absolute;

top: 0;

left: 0;

right: 0;

bottom: 0;

}

#effect h1 p span:first-child {

opacity: 1 !important;

z-index: 5;

}

#effect h1 p:hover span:first-child {

font-size: 104px;

bottom: -2px;

left: -2px;

right: -2px;

}

#effect h1 p span.wave {

color: #eaeaea;

text-shadow: 2px 0 0 #aaa, -2px 0 0 #aaa, 0 2px 0 #aaa, 0 -2px 0 #aaa, 1px 1px #aaa, -1px -1px 0 #aaa, 1px -1px 0 #aaa, -1px 1px 0 #aaa;

opacity: 0;

z-index: 1;

-webkit-animation: wave;

-webkit-animation-duration: 600ms;

-webkit-animation-timing-function: ease-in-out;

-moz-animation: wave;

-moz-animation-duration: 600ms;

-moz-animation-timing-function: ease-in-out;

}

@keyframes wave {

0% {

position: absolute;

top: 0;

left: 0;

right: 0;

bottom: 0;

opacity: 0;

}

50% {

opacity: 1;

}

100% {

font-size: 150px;

top: -250px;

left: -50px;

right: -50px;

opacity: 0;

}

}

@-webkit-keyframes wave {

0% {

position: absolute;

top: 0;

left: 0;

right: 0;

bottom: 0;

opacity: 0;

}

50% {

opacity: 1;

}

100% {

font-size: 150px;

top: -250px;

left: -50px;

right: -50px;

opacity: 0;

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值